Index of every page on this site: llms.txt
All skills
skillkeel avatar

/claude-md-init

@d19d0d1
Run it yourself

Use when a repo has no CLAUDE.md, or the user asks to create/refresh CLAUDE.md or project instructions for Claude Code. Generates a short, verified CLAUDE.md from the repo's real build/test/lint commands and layout, and never invents commands.

  • 1 file
  • 2.6 KB
  • Updated 2 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/skillkeel/skillkeel-starter/claude-md-init

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈65 tokens for metadata: the name and description. ≈588 when used: this file.

Description uses 3.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈260 characters, or 3.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

claude-md-init

A good CLAUDE.md is short, true, and command-centric. Aim for 40 to 80 lines.

Procedure

  1. Inventory (read, do not guess): ls, cat package.json | jq .scripts, Makefile targets, pyproject.toml / setup.cfg, Cargo.toml, go.mod, docker-compose*.yml, .github/workflows/*.yml (what CI actually runs), README.md headings, .editorconfig, lint configs.
  2. Verify each command you intend to list by running its cheapest, read-only form (npm run / pnpm run to list scripts, make -n test, pytest --collect-only -q | tail -1). Do not run installs or anything that writes to the tree; if a check would modify files, dry-run or skip it and say so. Drop anything that fails.
  3. Detect conventions from git: git log --format=%s -30 (commit style), branch naming, whether PRs are squashed.
  4. Write CLAUDE.md with these sections, omitting empty ones:
    • Project: one sentence, stack, runtime versions (from .nvmrc, .python-version, Dockerfile).
    • Commands: install, dev, test (single test example), lint/format, build, migrate. One line each, copy-pasteable.
    • Layout: 5 to 10 lines mapping top-level dirs to responsibilities.
    • Conventions: commit style, branch naming, formatting tool, test placement, error-handling idiom if visible.
    • Do not: files never to edit by hand (generated, lockfiles, migrations history), commands never to run without asking (deploy, db reset).
    • Verification: the exact command(s) that must pass before claiming done.
  5. Show the file, ask for corrections, then write it. If a CLAUDE.md already exists, propose a diff instead of overwriting.

Rules

  • Every command listed was executed or dry-run in this session. No exceptions.
  • No prose about "best practices"; only facts about this repo.
  • Do not include secrets, internal hostnames, or personal names.
  • Keep under 100 lines; longer instructions go in docs/ and are linked.

Verify

Maintainers: bash evals/run.sh /tmp/skillkeel-evals claude-md-init from the plugin root runs this case and grades it; records and transcripts sit in evals/claude-md-init/. evals/claude-md-init/: fixture: Node monorepo with pnpm scripts + GitHub Actions running pnpm test:ci; expected: CLAUDE.md lists pnpm test:ci (not npm test), notes lockfile as do-not-edit, ≤ 100 lines.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at d19d0d1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 2 months ago

README badge

README badge for skillkeel/skillkeel-starter/claude-md-init