{"id":"f8e96906-73e8-467e-803d-1a61ef1e5c4a","shortId":"sXWqnA","kind":"skill","title":"claude-md-generator","tagline":" AI Agent Skills built for GTM, Technical Marketing, and growth automation.","description":"# CLAUDE.md Generator\n\nRead the codebase. Write a CLAUDE.md that tells Claude exactly what it needs: no more, no less.\n\n---\n\n**Critical rule:** A good CLAUDE.md is under 100 lines. It contains only information Claude cannot derive from reading the code itself. Do not auto-write the file: always show the draft and wait for user approval first.\n\n**Code snippet rule:** Never include inline code examples in CLAUDE.md. Instead use `file.ts:42` references. Code in CLAUDE.md wastes tokens and goes stale.\n\n---\n\n## Step 1: Detect Mode\n\nDetermine which of three modes to run:\n\n**create**: No CLAUDE.md exists. Write one from scratch.\n**update**: A CLAUDE.md exists. Improve it without discarding custom content.\n**audit**: Score all CLAUDE.md files in the project A-F and output a quality report. If the user says \"audit\", \"check\", \"review\", or \"grade\" my CLAUDE.md, run audit mode.\n\n```bash\n# Discover ALL CLAUDE.md locations\nfind . -name \"CLAUDE.md\" -not -path \"*/node_modules/*\" -not -path \"*/.git/*\" 2>/dev/null\nls ~/.claude/CLAUDE.md 2>/dev/null && echo \"Global CLAUDE.md found\"\nls .claude.local.md 2>/dev/null && echo \".claude.local.md found\"\n```\n\nIf multiple CLAUDE.md files are found: list them. Ask: \"Found CLAUDE.md in [locations]. Should I update all of them or just [root]?\"\n\n---\n\n## Step 2: Audit Mode (skip to Step 3 if create/update)\n\nFor each CLAUDE.md found, score it A-F using this rubric:\n\n| Criterion | What to check |\n|-----------|--------------|\n| Commands | Build/test/lint commands present and runnable? |\n| Architecture | Non-obvious structure explained? |\n| Non-obvious patterns | Gotchas, generated files, env var order documented? |\n| Conciseness | Under 100 lines? No obvious filler? |\n| Currency | Commands still match current package.json/Makefile? |\n| Actionability | Can a new contributor follow this without asking questions? |\n\nScore: 90-100 = A, 70-89 = B, 50-69 = C, 30-49 = D, 0-29 = F\n\nPresent as a table:\n\n```\n## CLAUDE.md Audit Report\n\n| File | Score | Grade | Top Issues |\n|------|-------|-------|-----------|\n| ./CLAUDE.md | 72 | B | Missing gotchas section, test command outdated |\n| ./packages/api/CLAUDE.md | 45 | D | No commands, 340 lines (too long), stale arch notes |\n\n**Overall: B (72/100)**\n\nIssues found:\n- ./packages/api/CLAUDE.md: 340 lines: well over the 100-line target\n- ./packages/api/CLAUDE.md: Test command references `jest` but package.json uses `vitest`\n- ./CLAUDE.md: No Gotchas section: most valuable section is missing\n```\n\nAfter the report, ask: \"Want me to fix any of these? (all / just root / specify)\"\n\nIf user says yes, continue to Step 3 for each file they want fixed.\n\n---\n\n## Step 3: Scan Project Structure\n\n```bash\n# Project type and package manager\nls package.json yarn.lock pnpm-lock.yaml bun.lockb requirements.txt pyproject.toml Cargo.toml go.mod 2>/dev/null\n\n# Top-level directory structure\nfind . -maxdepth 2 -type d \\\n  | grep -v node_modules | grep -v .git | grep -v __pycache__ \\\n  | grep -v \".next\" | grep -v dist | grep -v build | sort\n```\n\n---\n\n## Step 4: Extract Build and Test Commands\n\n```bash\n# npm/yarn/pnpm/bun scripts\ncat package.json 2>/dev/null \\\n  | python3 -c \"\nimport sys, json\nd = json.load(sys.stdin)\nfor name, cmd in d.get('scripts', {}).items():\n    print(f'{name}: {cmd}')\n\"\n\n# Python, Go, Rust Makefiles\ncat Makefile 2>/dev/null | grep -E \"^[a-z].*:\" | head -20\n\n# Go\ncat go.mod 2>/dev/null | head -5\n\n# Rust\ncat Cargo.toml 2>/dev/null | grep -E \"^\\[\" | head -10\n```\n\nIdentify the exact commands for: build, test (all), test (single file/name), dev server, lint/typecheck. Note any env vars required to run them.\n\n---\n\n## Step 5: Find Code Style and Gotchas\n\n```bash\n# Import aliases (most commonly missed)\npython3 -c \"\nimport json, sys\ntry:\n    d = json.load(open('tsconfig.json'))\n    paths = d.get('compilerOptions', {}).get('paths', {})\n    if paths: print('Import aliases:', json.dumps(paths, indent=2))\nexcept: pass\n\" 2>/dev/null\n\n# Environment variables required\ncat .env.example 2>/dev/null | grep -v \"^#\" | grep -v \"^$\" | head -20\n\n# Auto-generated files (must not be edited)\nfind . -path \"*/node_modules\" -prune -o -name \"*.ts\" -print \\\n  | xargs grep -l \"DO NOT EDIT\\|@generated\\|Generated by\" 2>/dev/null | head -5\n\n# Test setup requirements\ncat jest.config.js jest.config.ts vitest.config.ts 2>/dev/null | head -30\n\n# Database/migration setup\nls migrations/ prisma/ drizzle/ db/ 2>/dev/null\n```\n\n**What counts as a Gotcha** (include these, skip everything else):\n- Files that are auto-generated (must not edit)\n- Env vars required BEFORE tests run\n- Non-default import alias mappings\n- Test commands that require a running service\n- Known intentional quirks (workarounds, not bugs)\n\n---\n\n## Step 6: Generate CLAUDE.md Draft with Gemini\n\nCompile all findings and generate the draft:\n\n```bash\ncat > /tmp/claude-md-request.json << 'ENDJSON'\n{\n  \"system_instruction\": {\n    \"parts\": [{\n      \"text\": \"Write a CLAUDE.md file for a software project. Rules: (1) Under 100 lines total. (2) Only include what Claude cannot derive from reading the code. (3) No inline code examples: use file.ts:42 references instead. (4) Sections: Commands, Code Style (only non-defaults), Testing (only if setup needed), Gotchas (required: what trips people up). Skip any section that has nothing non-obvious to say. (5) All commands in code blocks. (6) Preferred order: short Project Overview (1-2 sentences, only if non-obvious), Commands, Architecture (only non-obvious structure), Code Style, Testing, Gotchas. (7) Do not use em dashes. (8) Output only the CLAUDE.md content, no commentary.\"\n    }]\n  },\n  \"contents\": [{\n    \"parts\": [{\n      \"text\": \"PROJECT_ANALYSIS_HERE\"\n    }]\n  }],\n  \"generationConfig\": {\n    \"temperature\": 0.3,\n    \"maxOutputTokens\": 2048\n  }\n}\nENDJSON\n\ncurl -s -X POST \\\n  \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GEMINI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d @/tmp/claude-md-request.json \\\n  | python3 -c \"import sys,json; d=json.load(sys.stdin); print(d['candidates'][0]['content']['parts'][0]['text'])\"\n```\n\nReplace `PROJECT_ANALYSIS_HERE` with findings from Steps 3-5.\n\n**For large projects (50+ files):** Add a `@path` pointer at the bottom of CLAUDE.md instead of inline detail:\n\n```markdown\n## Extended Reference\nSee @docs/ai-context/architecture.md for full module map.\nSee @docs/ai-context/testing.md for integration test setup details.\n```\n\nWrite the referenced files to `docs/ai-context/` with the detail that would not fit in 100 lines.\n\n---\n\n## Step 7: Self-QA\n\nBefore presenting the draft, check:\n\n- [ ] Under 100 lines (count: `echo \"$CONTENT\" | wc -l`)\n- [ ] No inline code examples (only `file.ts:42` references or shell commands)\n- [ ] All commands in code blocks and runnable as-is\n- [ ] Gotchas section present with at least one real entry\n- [ ] No section that says only things obvious from the files\n- [ ] No em dashes\n- [ ] No marketing words or filler phrases (\"This project uses React to...\")\n- [ ] Import aliases documented if they exist\n- [ ] Auto-generated files marked \"do not edit\" if they exist\n\nIf any check fails, revise before presenting.\n\n---\n\n## Step 8: Present Draft and Wait for Approval\n\n**Never write the file without user approval.**\n\nPresent the draft in a code block:\n\n```\n## Draft CLAUDE.md ([N] lines)\n\n[full draft content here]\n\n---\nWrite this to CLAUDE.md? (yes / edit first / cancel)\n```\n\nIf user says **yes**: write the file, then confirm:\n\"CLAUDE.md written ([N] lines). Sections: [list of ## headers].\"\n\nIf user says **edit first**: apply their edits, re-show the draft.\n\nIf user says **cancel**: stop.\n\n---\n\n## What NOT to Include\n\n- Language/framework version (\"This is a TypeScript project\")\n- How the framework works (Claude already knows React, FastAPI, etc.)\n- List of all dependencies\n- Style rules the linter already enforces (indent size, quote style)\n- Content that duplicates README.md\n- Inline code examples or multi-line snippets\n- Anything that would be identical for any project using the same stack","tags":["claude","generator","opendirectory","varnan-tech","agent-skills","gtm","hermes-agent","openclaw-skills","skills","technical-seo"],"capabilities":["skill","source-varnan-tech","skill-claude-md-generator","topic-agent-skills","topic-gtm","topic-hermes-agent","topic-openclaw-skills","topic-skills","topic-technical-seo"],"categories":["opendirectory"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Varnan-Tech/opendirectory/claude-md-generator","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Varnan-Tech/opendirectory","source_repo":"https://github.com/Varnan-Tech/opendirectory","install_from":"skills.sh"}},"qualityScore":"0.511","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 123 github stars · SKILL.md body (8,055 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T00:55:49.174Z","embedding":null,"createdAt":"2026-04-18T22:18:23.660Z","updatedAt":"2026-05-02T00:55:49.174Z","lastSeenAt":"2026-05-02T00:55:49.174Z","tsv":"'-10':506 '-100':283 '-2':776 '-20':490,582 '-29':295 '-30':622 '-49':292 '-5':497,611,859 '-69':289 '-89':286 '/.claude/claude.md':171 '/.git':167 '/claude.md':309,353 '/dev/null':169,173,181,412,456,483,495,502,569,576,609,620,631 '/makefile?':270 '/node_modules':164,593 '/packages/api/claude.md':318,335,344 '/tmp/claude-md-request.json':692,833 '/v1beta/models/gemini-2.0-flash:generatecontent?key=$gemini_api_key':826 '0':294,845,848 '0.3':816 '1':96,707,775 '100':42,258,341,709,908,921 '2':168,172,180,208,411,420,455,482,494,501,565,568,575,608,619,630,712 '2048':818 '3':214,384,392,723,858 '30':291 '340':323,336 '4':444,732 '45':319 '5':530,763 '50':288,863 '6':677,769 '7':794,911 '70':285 '72':310 '72/100':332 '8':800,1006 '90':282 'a-f':132,223 'a-z':486 'action':271 'add':865 'agent':6 'ai':5 'alia':661 'alias':538,561,982 'alreadi':1094,1107 'alway':63 'analysi':812,852 'anyth':1125 'appli':1065 'application/json':831 'approv':71,1012,1019 'arch':328 'architectur':239,784 'as-i':945 'ask':193,279,365 'audit':124,144,152,209,302 'auto':59,584,646,988 'auto-gener':583,645,987 'auto-writ':58 'autom':15 'b':287,311,331 'bash':154,396,450,536,690 'block':768,942,1026 'bottom':871 'bug':675 'build':441,446,512 'build/test/lint':234 'built':8 'bun.lockb':406 'c':290,458,543,835 'cancel':1042,1076 'candid':844 'cannot':49,717 'cargo.toml':409,500 'cat':453,480,492,499,573,615,691 'check':145,232,919,1000 'claud':2,26,48,716,1093 'claude-md-gener':1 'claude.local.md':179,183 'claude.md':16,23,39,82,89,108,116,127,150,157,161,176,187,195,219,301,679,700,804,873,1028,1038,1052 'cmd':467,475 'code':54,73,79,87,532,722,726,735,767,790,930,941,1025,1118 'codebas':20 'command':233,235,264,316,322,346,449,510,664,734,765,783,937,939 'commentari':807 'common':540 'compil':683 'compileropt':554 'concis':256 'confirm':1051 'contain':45 'content':123,805,808,829,846,925,1033,1113 'content-typ':828 'continu':381 'contributor':275 'count':633,923 'creat':106 'create/update':216 'criterion':229 'critic':35 'curl':820 'currenc':263 'current':267 'custom':122 'd':293,320,422,462,548,832,839,843 'd.get':469,553 'dash':799,969 'database/migration':623 'db':629 'default':659,740 'depend':1102 'deriv':50,718 'detail':877,893,902 'detect':97 'determin':99 'dev':518 'directori':416 'discard':121 'discov':155 'dist':438 'docs/ai-context':899 'docs/ai-context/architecture.md':882 'docs/ai-context/testing.md':888 'document':255,983 'draft':66,680,689,918,1008,1022,1027,1032,1072 'drizzl':628 'duplic':1115 'e':485,504 'echo':174,182,924 'edit':590,604,650,994,1040,1063,1067 'els':641 'em':798,968 'endjson':693,819 'enforc':1108 'entri':956 'env':252,523,651 'env.example':574 'environ':570 'etc':1098 'everyth':640 'exact':27,509 'exampl':80,727,931,1119 'except':566 'exist':109,117,986,997 'explain':244 'extend':879 'extract':445 'f':134,225,296,473 'fail':1001 'fastapi':1097 'file':62,128,188,251,304,387,586,642,701,864,897,966,990,1016,1049 'file.ts:42':85,729,933 'file/name':517 'filler':262,974 'find':159,418,531,591,685,855 'first':72,1041,1064 'fit':906 'fix':369,390 'follow':276 'found':177,184,190,194,220,334 'framework':1091 'full':884,1031 'gemini':682 'generat':4,17,250,585,605,606,647,678,687,989 'generationconfig':814 'generativelanguage.googleapis.com':825 'generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generatecontent?key=$gemini_api_key':824 'get':555 'git':429 'global':175 'go':477,491 'go.mod':410,493 'goe':93 'good':38 'gotcha':249,313,355,535,636,746,793,948 'grade':148,306 'grep':423,427,430,433,436,439,484,503,577,579,600 'growth':14 'gtm':10 'h':827 'head':489,496,505,581,610,621 'header':1059 'ident':1129 'identifi':507 'import':459,537,544,560,660,836,981 'improv':118 'includ':77,637,714,1081 'indent':564,1109 'inform':47 'inlin':78,725,876,929,1117 'instead':83,731,874 'instruct':695 'integr':890 'intent':671 'issu':308,333 'item':471 'jest':348 'jest.config.js':616 'jest.config.ts':617 'json':461,545,838 'json.dumps':562 'json.load':463,549,840 'know':1095 'known':670 'l':601,927 'language/framework':1082 'larg':861 'least':953 'less':34 'level':415 'line':43,259,324,337,342,710,909,922,1030,1055,1123 'lint/typecheck':520 'linter':1106 'list':191,1057,1099 'locat':158,197 'long':326 'ls':170,178,402,625 'makefil':479,481 'manag':401 'map':662,886 'mark':991 'markdown':878 'market':12,971 'match':266 'maxdepth':419 'maxoutputtoken':817 'md':3 'migrat':626 'miss':312,361,541 'mode':98,103,153,210 'modul':426,885 'multi':1122 'multi-lin':1121 'multipl':186 'must':587,648 'n':1029,1054 'name':160,466,474,596 'need':30,745 'never':76,1013 'new':274 'next':435 'node':425 'non':241,246,658,739,759,781,787 'non-default':657,738 'non-obvi':240,245,758,780,786 'note':329,521 'noth':757 'npm/yarn/pnpm/bun':451 'o':595 'obvious':242,247,261,760,782,788,963 'one':111,954 'open':550 'order':254,771 'outdat':317 'output':136,801 'overal':330 'overview':774 'packag':400 'package.json':269,350,403,454 'package.json/makefile?':268 'part':696,809,847 'pass':567 'path':163,166,552,556,558,563,592,867 'pattern':248 'peopl':750 'phrase':975 'pnpm-lock.yaml':405 'pointer':868 'post':823 'prefer':770 'present':236,297,916,950,1004,1007,1020 'print':472,559,598,842 'prisma':627 'project':131,394,397,705,773,811,851,862,977,1088,1132 'prune':594 'pycach':432 'pyproject.toml':408 'python':476 'python3':457,542,834 'qa':914 'qualiti':138 'question':280 'quirk':672 'quot':1111 're':1069 're-show':1068 'react':979,1096 'read':18,52,720 'readme.md':1116 'real':955 'refer':86,347,730,880,934 'referenc':896 'replac':850 'report':139,303,364 'requir':525,572,614,653,666,747 'requirements.txt':407 'review':146 'revis':1002 'root':206,375 'rubric':228 'rule':36,75,706,1104 'run':105,151,527,656,668 'runnabl':238,944 'rust':478,498 'say':143,379,762,960,1045,1062,1075 'scan':393 'score':125,221,281,305 'scratch':113 'script':452,470 'section':314,356,359,733,754,949,958,1056 'see':881,887 'self':913 'self-qa':912 'sentenc':777 'server':519 'servic':669 'setup':613,624,744,892 'shell':936 'short':772 'show':64,1070 'singl':516 'size':1110 'skill':7 'skill-claude-md-generator' 'skip':211,639,752 'snippet':74,1124 'softwar':704 'sort':442 'source-varnan-tech' 'specifi':376 'stack':1136 'stale':94,327 'step':95,207,213,383,391,443,529,676,857,910,1005 'still':265 'stop':1077 'structur':243,395,417,789 'style':533,736,791,1103,1112 'sys':460,546,837 'sys.stdin':464,841 'system':694 'tabl':300 'target':343 'technic':11 'tell':25 'temperatur':815 'test':315,345,448,513,515,612,655,663,741,792,891 'text':697,810,849 'thing':962 'three':102 'token':91 'top':307,414 'top-level':413 'topic-agent-skills' 'topic-gtm' 'topic-hermes-agent' 'topic-openclaw-skills' 'topic-skills' 'topic-technical-seo' 'total':711 'tri':547 'trip':749 'ts':597 'tsconfig.json':551 'type':398,421,830 'typescript':1087 'updat':114,200 'use':84,226,351,728,797,978,1133 'user':70,142,378,1018,1044,1061,1074 'v':424,428,431,434,437,440,578,580 'valuabl':358 'var':253,524,652 'variabl':571 'version':1083 'vitest':352 'vitest.config.ts':618 'wait':68,1010 'want':366,389 'wast':90 'wc':926 'well':338 'without':120,278,1017 'word':972 'work':1092 'workaround':673 'would':904,1127 'write':21,60,110,698,894,1014,1035,1047 'written':1053 'x':822 'xarg':599 'yarn.lock':404 'yes':380,1039,1046 'z':488","prices":[{"id":"dd368317-260e-4685-a070-3959e680e69a","listingId":"f8e96906-73e8-467e-803d-1a61ef1e5c4a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Varnan-Tech","category":"opendirectory","install_from":"skills.sh"},"createdAt":"2026-04-18T22:18:23.660Z"}],"sources":[{"listingId":"f8e96906-73e8-467e-803d-1a61ef1e5c4a","source":"github","sourceId":"Varnan-Tech/opendirectory/claude-md-generator","sourceUrl":"https://github.com/Varnan-Tech/opendirectory/tree/main/skills/claude-md-generator","isPrimary":false,"firstSeenAt":"2026-04-18T22:18:23.660Z","lastSeenAt":"2026-05-02T00:55:49.174Z"}],"details":{"listingId":"f8e96906-73e8-467e-803d-1a61ef1e5c4a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Varnan-Tech","slug":"claude-md-generator","github":{"repo":"Varnan-Tech/opendirectory","stars":123,"topics":["agent-skills","gtm","hermes-agent","openclaw-skills","skills","technical-seo"],"license":null,"html_url":"https://github.com/Varnan-Tech/opendirectory","pushed_at":"2026-04-30T18:54:05Z","description":" AI Agent Skills built for GTM, Technical Marketing, and growth automation.","skill_md_sha":"24b34c2513f3988736d654f3c770774ef20eacc3","skill_md_path":"skills/claude-md-generator/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Varnan-Tech/opendirectory/tree/main/skills/claude-md-generator"},"layout":"multi","source":"github","category":"opendirectory","frontmatter":{"name":"claude-md-generator","description":"","compatibility":"[claude-code, gemini-cli, github-copilot]"},"skills_sh_url":"https://skills.sh/Varnan-Tech/opendirectory/claude-md-generator"},"updatedAt":"2026-05-02T00:55:49.174Z"}}