setup-project-context
Skill0 starsChanged 22 days agoMITView on GitHub
Create, migrate or audit a project's docs to the numbered docs/01–17 standard (lean CLAUDE.md index + slots). Use for new projects, for restructuring legacy docs (rule.md, context.md, tasks.md, memory.md, DESIGN.md, docs/deploy.md…), or for checking compliance.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- jd-solanki/krutrimboxtheir own version, first seen Sep 27, 2026
- wooyong99/claude-code-playbooktheir own version, first seen Apr 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- wooyong99/claude-code-playbook★ 2same name
- jd-solanki/krutrimbox★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/setup-project-context/templates/CLAUDE.mdCLAUDE.md
- backend-architectureSkill
- build-review-loopSkill
- capability-intakeSkill
- competitor-market-analysisSkill
- context-auditSkill
- data-analysis-insightsSkill
- data-privacy-securitySkill
- dev-agentsSkill
- dev-patternsSkill
- frontend-system-designSkill
- idea-validatorSkill
- intellectual-property-licensingSkill
- international-legal-researchSkill
- legal-document-drafterSkill
- llm-councilSkill
- make-slidesSkill
- password-authentication-securitySkill
- privacy-data-protection-lawSkill
- project-estimation-planningSkill
- project-startSkill
- rea-researchSkill
- requirements-business-analystSkill
- secrets-credential-managerSkill
- seo-tech-stackSkill
- shopify-ui-auditSkill
- site-incidentSkill
- sop-process-builderSkill
- task-dispatchSkill
- technical-feasibilitySkill
- tech-research-intelligenceSkill
- update-mdSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Run dir (snapshots, staging, reports): $DOCSMIG_RUN, default ~/Desktop/<workspace>/_backups/docs-migration-<date>/ (chmod 700)
- Distinctive: line 18
Do not invoke agents, MCP servers, plugins, external packs or gstack inside this skill.
- Very specific: line 19
Do not modify application source code or committed ignore files.
- Very specific: line 22
No secret values anywhere — vault pointers only.
- Distinctive: line 23
Never copy global rules or global memory notes into project files.
- Very specific: line 28
Write CLAUDE.md from templates/CLAUDE.md (≤70 lines).
- Distinctive: line 29
Create only slots that have real content now (usually 01, 07, 08.
- Very specific: line 36
Read only the snapshot files listed in plan.json.
- Very specific: line 47
Write report.md in the project's run folder: moved, split, dropped (ledger count + reasons), backfilled slots, warnings.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Docs — new / migrate / audit
Request: $ARGUMENTS
- Standard (read first):
~/.claude/references/project-docs-standard.md - Templates (guides, never copied empty):
~/.claude/skills/setup-project-context/templates/ - Engine:
python3 -I ~/.claude/skills/setup-project-context/scripts/docsmig.py --help - Run dir (snapshots, staging, reports):
$DOCSMIG_RUN, default~/Desktop/<workspace>/_backups/docs-migration-<date>/(chmod 700)
Restrictions
- Do not invoke agents, MCP servers, plugins, external packs or gstack inside this skill. A batch orchestrator may run one subagent per project; that subagent follows these restrictions.
- Do not modify application source code or committed ignore files. Local ignore rules go in
.git/info/exclude. - Never push, merge, tag, release, open PRs or deploy. Project docs never leave this machine (standard §7): a git repo with a remote ends
migratewithdocsmig.py localize(one local commitdocs: stop tracking internal project docs, docs ignored);docsmig.py commit(branchdocs-restructure) is only for git repos without a remote. No AI attribution anywhere. docsmig.py localizeanddocsmig.py adoptchange the user's checkout — run them only after the user approves migrating that project.- No secret values anywhere — vault pointers only. Never open
vault*,*secret*,*credential*,.env*(only.env.example/.env.samplemay be read, for variable names). - Never copy global rules or global memory notes into project files. Never create empty or placeholder files.
Mode: new
- Resolve the project path and type (standard §4). Read the brief or proposal if one is provided.
- Write
CLAUDE.mdfromtemplates/CLAUDE.md(≤70 lines). Docs map = applicable slots; every missing file markedunwritten. - Create only slots that have real content now (usually 01, 07, 08; plus 03/09 once a scaffold exists). Strip all template comments.
- Git repo: append the exclude block (standard §7) to
.git/info/excludebefore writing any doc, then confirmgit statusshows none of them. With a remote, write the index as.claude/CLAUDE.md, notCLAUDE.md. IfCLAUDE.mdor other docs are already tracked, untrack them only after user OK, in one commitdocs: stop tracking internal project docs. - Report (format below).
Mode: migrate
docsmig.py prepare <project>→ snapshot +plan.json(mode, base sha, private paths, allowed slots, active flag, out dir). Exit 30 = MANUAL: stop and report.- Read only the snapshot files listed in
plan.json; read the live tree only for backfill. - Build the new docs under the
out/dir fromplan.json(it mirrors project paths):- Route whole sections verbatim with the legacy map (standard §9). Keep wording; only adjust heading levels.
- Material over 300 lines →
out/docs/ref/byte-identical, linked from its slot. - Content from private (ignored) sources → only
docs/NN-<SLOT>.local.md. - Exact duplicates and copies of global rules → drop, and log each in
ledger.tsvas<line>\t<reason>; reasons:dup-of:<file>:<line>,global-dup:<file>:<line>,legacy-pointer,secret. - Root
SKILL.md→.claude/skills/<name>/SKILL.mdwith frontmatter (name,description;disable-model-invocation: truewhen it touches live systems). - Active projects only — backfill missing applicable slots from code (standard §3), reading ≤25 files; every backfilled section ends with
Source: `path`. Never write 01, 07, 08, 15 or 17 from code; never infer intent, status, hosts or values. CLAUDE.mdfrom the template: identity line, Hard rules (damage-if-violated only), Stack, Commands (must exist), Docs map matchingout/(unwritten,+local).
docsmig.py verify <project>→ fix and re-run, at most 2 retries. Still failing = FAIL, report.- Git repo with a remote:
docsmig.py localize <project> --check, then (after user OK)docsmig.py localize <project>. Several worktrees of one repo:docsmig.py materialize <source-worktree> <shared-folder>(outside every repo), thenlocalize <each worktree> --link-from <shared-folder>. Git repo without a remote:docsmig.py commit <project>. In-place mode:docsmig.py apply <project>. - Write
report.mdin the project's run folder: moved, split, dropped (ledger count + reasons), backfilled slots, warnings. - Return one line:
STATUS <slug> <mode> <localized@sha|branch@sha|applied> slots=<n> local=<n> ref=<n> backfill=<slots> ledger=<n> warn=<n> "<note>".
Mode: audit
Read-only: docsmig.py audit <project>. Checks Docs map vs disk vs type, no placeholder slots, no legacy files beside a map, .local.md ignored and untracked, docs untracked and ignored in repos with a remote, CLAUDE.md ≤70 lines, no secret patterns in tracked docs, deploy excludes listed in 16 when the project root is uploaded.
Result reporting
Mode: <new|migrate|audit> · Project: <path> · Type: <type> · Docs: v2|legacy
Created/Updated: <paths>
Moved: <legacy file → slot>, …
Dropped (ledger): <n> lines (<reasons>)
Backfilled: <slots> (sources cited)
Git: localized @<sha> | docs-restructure @<sha> (no remote) | in-place (snapshot <path>) | none
Push performed: NoDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

