refresh-claude-md
Skill10 starsChanged 4 months agoMITView on GitHub
Use when the project's CLAUDE.md is stale or missing and must be regenerated from the current codebase — re-detect tech stack, commands, conventions, and structure, then update CLAUDE.md while preserving every human-authored customization. Adapted from the ECC codebase-onboarding skill.
- Reads credentials
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-problemSkill
- api-reviewSkill
- article-writingSkill
- assignment-compliance-checkSkill
- automation-audit-opsSkill
- autonomous-loopsSkill
- benchmark-optimization-loopSkill
- benchmarkSkill
- blueprintSkill
- class-refactoringSkill
- cleanup-local-branchesSkill
- codebase-simplification-auditSkill
- code-review-bugsnagSkill
- code-review-githubSkill
- code-review-jiraSkill
- code-reviewSkill
- composer-updateSkill
- create-issues-from-textSkill
- create-issueSkill
- create-missing-tests-in-prSkill
- create-testSkill
- design-systemSkill
- docker-patternsSkill
- e2e-testingSkill
- frontend-a11ySkill
- frontend-design-directionSkill
- frontend-patternsSkill
- frontend-slidesSkill
- git-workflowSkill
- laravel-authorization-reviewSkill
- laravel-securitySkill
- laravel-telescopeSkill
- latency-critical-systemsSkill
- merge-github-prSkill
- mysql-patternsSkill
- mysql-problem-solverSkill
- penetration-testerSkill
- postgres-patternsSkill
- prepare-issue-contextSkill
- process-code-reviewSkill
- product-capabilitySkill
- production-auditSkill
- pr-staged-merge-planSkill
- pr-summarySkill
- record-project-memorySkill
- redis-patternsSkill
- refactor-entry-point-to-actionSkill
- resolve-issueSkill
- rewrite-tests-pestSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-threat-analysisSkill
- seoSkill
- skill-creatorSkill
- slack-messagingSkill
- smartest-project-additionSkill
- test-driven-developmentSkill
- tester-cookbookSkill
- test-like-humanSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Keep CLAUDE.md scannable and under ~100 lines.
- Distinctive: line 17
Do not modify other skills, rules, or production code
- Distinctive: line 25
Do not use this skill for ad-hoc codebase questions, code review, or onboarding write-ups — it has one job: keep CLAUDE.md correct.
- Distinctive: line 30
Read the existing CLAUDE.md (if any) and record which sections are human-authored vs auto-generated.
- Distinctive: line 47
Use Read only to disambiguate conflicting signals.
- Distinctive: line 50
Update the auto-generated sections in place.
- Distinctive: line 51
When creating a new file, use these sections, omitting any that do not apply: Tech Stack, Code Style, Testing, Build & Run, Project …
- Distinctive: line 55
Run every command written into the Build & Run / Testing sections to confirm it exists and is correct.
- Distinctive: line 64
Every pre-existing human-authored section is preserved verbatim
- Distinctive: line 65
All documented commands have been run and confirmed to work
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Constraints
- Apply
@rules/php/core-standards.mdc - Apply
@rules/git/general.mdc - Trigger only to update or create
CLAUDE.md— never run this as a general onboarding or audit task - Reconnaissance uses Glob and Grep; use Read only to resolve an ambiguous signal, never to read every file
- Enhance, never blindly replace: preserve all human-authored sections, custom rules, and project-specific instructions already in
CLAUDE.md - Keep
CLAUDE.mdscannable and under ~100 lines; link to@rules/**instead of pasting rule content - Flag unknowns explicitly ("Could not determine X") rather than speculate
- Do not modify other skills, rules, or production code
Use when
CLAUDE.mddoes not exist and the project needs one generated from the codebaseCLAUDE.mdis stale — the tech stack, build/test commands, directory layout, or conventions have drifted from what the file documents- The user asks to "refresh", "regenerate", "update", or "rebuild"
CLAUDE.md - A dependency, framework, or tooling change has invalidated the documented commands or structure
Do not use this skill for ad-hoc codebase questions, code review, or onboarding write-ups — it has one job: keep CLAUDE.md correct.
Execution
1. Decide whether a refresh is warranted
- Read the existing
CLAUDE.md(if any) and record which sections are human-authored vs auto-generated. - Confirm at least one trigger applies. If
CLAUDE.mdalready matches the codebase, stop and report "no refresh needed" instead of rewriting it.
2. Reconnaissance (Glob + Grep only)
Gather signals without reading every file:
- Manifests —
composer.json,package.json,go.mod,pyproject.toml,Cargo.toml,Gemfile, etc. - Framework fingerprint — Laravel (
artisan,bootstrap/app.php),vite.config.*,next.config.*, and similar config files - Entry points —
public/index.php,artisan,app.*,main.*,src/roots,routes/ - Directory snapshot — top two levels, excluding
vendor,node_modules,.git,dist,build,storage - Tooling —
phpstan.neon,pint.json,rector.php,phpcs.xml,.github/workflows/,Dockerfile,.env.example - Tests —
tests/,*Test.php,*.spec.ts, Pest/PHPUnit config
3. Synthesize
- Tech stack — languages, framework versions, database, build tools, CI.
- Commands — extract real dev/build/test/lint commands from
composer.jsonscripts,package.jsonscripts, andMakefile; never invent a command. - Structure — map key directories to their purpose.
- Conventions — naming, error handling, and Git workflow from recent
git log(skip and note if history is shallow). - Use Read only to disambiguate conflicting signals; trust actual code over config when they disagree.
4. Merge into CLAUDE.md
- Update the auto-generated sections in place; leave human-authored content untouched.
- When creating a new file, use these sections, omitting any that do not apply: Tech Stack, Code Style, Testing, Build & Run, Project Structure, Conventions.
- Mark each detected fact so the next refresh can tell generated content from custom edits.
5. Validate
- Run every command written into the Build & Run / Testing sections to confirm it exists and is correct.
- Run the project's detected build / quality command — the same one written into the Build & Run section — and fix any errors before declaring done. On a Composer/PHP project that command is typically
composer build; on a Node projectnpm run build, on a Go projectgo build ./..., and so on. Never hard-assume a PHP toolchain on a project the reconnaissance fingerprinted as another stack.
Output
- Updated (or newly created)
CLAUDE.mdat the project root. - A short summary covering: whether a refresh was needed, which sections were updated vs preserved, which commands were verified, and any facts that could not be determined.
Done when
CLAUDE.mdreflects the current tech stack, verified commands, structure, and conventions- Every pre-existing human-authored section is preserved verbatim
- All documented commands have been run and confirmed to work
- The project's detected build / quality command finishes without errors (
composer buildon this Composer/PHP package) - The summary lists updated vs preserved sections and any unresolved unknowns
Does 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.

