agentleFS
mboss37mboss37/claude-launchpad/.claude/skills/lp-enhance/SKILL.md

lp-enhance

Skill8 starsChanged 5 months agoMITView on GitHub

AI-improve your CLAUDE.md based on codebase analysis. Fills in architecture, conventions, guardrails, and suggests hooks and MCP servers. TRIGGER when: user runs /lp-enhance, asks to "improve CLAUDE.md", "fill in architecture", or after major refactors. DO NOT TRIGGER when: user is editing CLAUDE.md manually, doing normal coding, or running doctor/eval.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

40 rules. About 0 are common, 22 are distinctive, and 18 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈22

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 18

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read CLAUDE.md and the project's codebase, then update CLAUDE.md to fill in missing or incomplete sections.

    line 15
  2. Distinctive:

    Read CLAUDE.md (if it exists)

    line 19
  3. Very specific:

    Read .claude/CLAUDE.md (local config, if it exists)

    line 20
  4. Very specific:

    Read .claude/settings.json (hooks, permissions, MCP)

    line 21
  5. Very specific:

    Read .claude/settings.local.json (local settings, if it exists)

    line 22
  6. Very specific:

    Read .claude/rules/*.md (existing rules)

    line 23
  7. Distinctive:

    Read .claudeignore (if it exists)

    line 24
  8. Very specific:

    Read package.json / go.mod / pyproject.toml for stack detection

    line 26
  9. Very specific:

    Check for monorepo indicators (workspaces, nx.json, lerna.json)

    line 27
  10. Distinctive:

    Check scenarios/ directory for existing eval scenarios

    line 28
  11. Very specific:

    ## Memory (agentic-memory): - ONLY if agentic-memory is configured in settings.json.

    line 40
  12. Distinctive:

    ## Key Decisions: - only decisions that affect how Claude works in this codebase

    line 41
  13. Very specific:

    Skill Authoring: - if .claude/rules/conventions.md lacks a Skill Authoring section, plan to add one

    line 43
  14. Very specific:

    If any section would exceed 8 bullets, plan a .claude/rules/ file for the overflow.

    line 45
  15. Very specific:

    Create or update .claude/rules/ files for overflow content

    line 53
  16. Distinctive:

    Verify line count is under 200

    line 57
  17. Distinctive:

    Don't remove existing content, only add or improve

    line 60
  18. Distinctive:

    Use bullet points, not paragraphs

    line 62
  19. Very specific:

    Run claude-launchpad doctor to check the score improved

    line 66
  20. Very specific:

    If eval scenarios were generated, print: "Run this in your terminal (not inside Claude Code): claude-launchpad eval --scenarios scenarios/ …

    line 69
  21. Very specific:

    Check for monorepo indicators: workspaces in package.json, pnpm-workspace.yaml, nx.json, lerna.json.

    line 79
  22. Distinctive:

    Check for docs/, tests/, scripts/ as separate scopes.

    line 80
  23. Distinctive:

    Keep route handlers under 30 lines

    line 90
  24. Distinctive:

    If path-scoped rules already exist, don't overwrite them

    line 103
  25. Very specific:

    If .claude/rules/conventions.md exists but has no Skill Authoring section, add this:

    line 111
  26. Very specific:

    When creating Claude Code skills (.claude/skills/*/SKILL.md):

    line 115
  27. Very specific:

    Keep SKILL.md under 500 lines — move reference material to supporting files in the same directory

    line 117
  28. Distinctive:

    Add allowed-tools in frontmatter to restrict tool access (e.g.

    line 119
  29. Distinctive:

    Add argument-hint in frontmatter showing the expected input format (use $ARGUMENTS or $0, $1 for dynamic input)

    line 120
  30. Distinctive:

    If you see project-specific patterns that deserve hooks, suggest them

    line 128
  31. Distinctive:

    If the SessionStart matcher misses compact/clear, suggest widening it to startup|resume|compact|clear (there is NO PostCompact event — it …

    line 129
  32. Distinctive:

    If no SessionStart hook exists, suggest one that injects TASKS.md

    line 130
  33. Very specific:

    DO NOT modify settings.json directly.

    line 131
  34. Distinctive:

    Read .claudeignore and check if the patterns make sense for the detected stack:

    line 135
  35. Distinctive:

    Test fixtures or seed data (might be needed for context)

    line 148
  36. Distinctive:

    If .claudeignore is missing entirely, create one with sensible defaults for the detected stack.

    line 150
  37. Distinctive:

    If it exists but has gaps, print suggested additions.

    line 151
  38. Distinctive:

    After improving CLAUDE.md, generate 2-3 custom eval scenarios that test whether Claude follows the project's specific rules.

    line 155
  39. Distinctive:

    Write checks that verify compliance (grep for patterns, file-exists for structure)

    line 188
  40. Very specific:

    If you detect a monorepo, suggest claudeMdExcludes in settings.json

    line 201

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- lp-enhance-version: 10 -->

lp-enhance - AI-powered CLAUDE.md improver

Read CLAUDE.md and the project's codebase, then update CLAUDE.md to fill in missing or incomplete sections.

Phase 1: Research

  1. Read CLAUDE.md (if it exists)
  2. Read .claude/CLAUDE.md (local config, if it exists)
  3. Read .claude/settings.json (hooks, permissions, MCP)
  4. Read .claude/settings.local.json (local settings, if it exists)
  5. Read .claude/rules/*.md (existing rules)
  6. Read .claudeignore (if it exists)
  7. Scan src/ directory structure (top-level dirs, key files)
  8. Read package.json / go.mod / pyproject.toml for stack detection
  9. Check for monorepo indicators (workspaces, nx.json, lerna.json)
  10. Check scenarios/ directory for existing eval scenarios

Done when: you have a mental model of the stack, architecture, and existing config.

Phase 2: Plan

Count current CLAUDE.md actionable lines. Budget is 200 lines max. Plan which sections to add or improve:

  1. ## Stack - detect language, framework, package manager
  2. ## Architecture - 3-5 bullets describing codebase shape
  3. ## Conventions - max 8 key patterns. Overflow to .claude/rules/conventions.md
  4. ## Off-Limits - max 8 guardrails specific to this project
  5. ## Memory (agentic-memory) - ONLY if agentic-memory is configured in settings.json. Max 6 bullets. Use this exact heading so memory install stays idempotent.
  6. ## Key Decisions - only decisions that affect how Claude works in this codebase
  7. Skill Authoring - if .claude/rules/conventions.md lacks a Skill Authoring section, plan to add one

If any section would exceed 8 bullets, plan a .claude/rules/ file for the overflow.

Done when: you know exactly what to add/change and the line count stays under 200.

Phase 3: Execute

Edit CLAUDE.md with the planned changes. Then:

  1. Create or update .claude/rules/ files for overflow content
  2. Generate path-scoped rules if the project has distinct areas (see below)
  3. Review .claudeignore and print suggestions (see below)
  4. Generate 2-3 custom eval scenarios in scenarios/custom/ (see below)
  5. Verify line count is under 200

Rules:

  • Don't remove existing content, only add or improve
  • Be specific to THIS project, not generic advice
  • Use bullet points, not paragraphs

Phase 4: Verify

  1. Run claude-launchpad doctor to check the score improved
  2. Print suggested hooks (exact JSON) for .claude/settings.json but don't modify it
  3. Print suggested MCP servers if external services detected (Postgres, Redis, Stripe, etc.)
  4. If eval scenarios were generated, print: "Run this in your terminal (not inside Claude Code): claude-launchpad eval --scenarios scenarios/ --runs 1"

Done when: doctor score is equal or higher, suggestions printed, eval scenarios created if applicable.

Path-scoped rules generation

Scan the project structure and generate focused .claude/rules/ files with paths: frontmatter. These load ONLY when Claude works on matching files, saving context tokens.

How to detect areas:

  1. List top-level directories under src/ (or equivalent). Each distinct area (api, components, lib, tests) is a candidate.
  2. Check for monorepo indicators: workspaces in package.json, pnpm-workspace.yaml, nx.json, lerna.json. Each workspace is a candidate.
  3. Check for docs/, tests/, scripts/ as separate scopes.

For each detected area, create a rules file with this format:


paths: ["src/api/**"]

API Rules

  • Validate all request input with zod schemas
  • Return typed error responses, never throw raw errors
  • Keep route handlers under 30 lines

Stack-specific patterns to include:

  • Next.js app/: "Use Server Components by default, add 'use client' only when needed"
  • API routes / src/api/: "Validate input at boundaries, typed error responses"
  • React components: "Colocate components near usage, props interface above component"
  • Tests: "One assertion per test when possible, descriptive test names"
  • Database / prisma/ / drizzle/: "Never write raw SQL, use the ORM, migrations required"
  • Docs: "No em dashes, max 3 sentences per paragraph, code examples required"

When NOT to generate:

  • Small projects with < 5 source files (one conventions.md is enough)
  • Projects where all code is in one flat directory
  • If path-scoped rules already exist, don't overwrite them

Monorepo handling:

  • Each package gets its own rules file: .claude/rules/packages-<name>.md
  • Suggest claudeMdExcludes in settings.json to skip irrelevant package CLAUDE.md files

Skill authoring conventions

If .claude/rules/conventions.md exists but has no Skill Authoring section, add this:

Skill Authoring

When creating Claude Code skills (.claude/skills/*/SKILL.md):

  • Keep SKILL.md under 500 lines — move reference material to supporting files in the same directory
  • Front-load description (first 250 chars shown in listings) with TRIGGER when / DO NOT TRIGGER when clauses
  • Add allowed-tools in frontmatter to restrict tool access (e.g. Read, Glob, Grep for read-only skills)
  • Add argument-hint in frontmatter showing the expected input format (use $ARGUMENTS or $0, $1 for dynamic input)
  • Set disable-model-invocation: true for skills with side effects (deploy, send messages)
  • Structure as phases: Research, Plan, Execute, Verify with "Done when:" success criteria per phase
  • Handle edge cases and preconditions before execution

Hook review

Review .claude/settings.json hooks:

  • If you see project-specific patterns that deserve hooks, suggest them
  • If the SessionStart matcher misses compact/clear, suggest widening it to startup|resume|compact|clear (there is NO PostCompact event — it never fires)
  • If no SessionStart hook exists, suggest one that injects TASKS.md
  • DO NOT modify settings.json directly. Print exact JSON to add.

.claudeignore review

Read .claudeignore and check if the patterns make sense for the detected stack:

Always flag:

  • Missing node_modules/ (JS/TS projects)
  • Missing pycache/ or .venv/ (Python projects)
  • Missing target/ (Rust/Java projects)
  • Missing .env / .env.* patterns
  • Missing lock files (pnpm-lock.yaml, package-lock.json, yarn.lock, etc.)
  • Missing coverage/ directory
  • Large generated files that waste context (*.min.js, *.map, migrations/)

Never flag:

  • Patterns the user clearly added intentionally
  • Test fixtures or seed data (might be needed for context)

If .claudeignore is missing entirely, create one with sensible defaults for the detected stack. If it exists but has gaps, print suggested additions. Do NOT modify it directly.

Eval scenario generation

After improving CLAUDE.md, generate 2-3 custom eval scenarios that test whether Claude follows the project's specific rules. Write them as YAML files in scenarios/ at the project root.

Scenario YAML format:

name: custom/scenario-name
description: What this scenario tests
setup:
  files:
    - path: src/example.ts
      content: |
        // Starter file that tempts Claude to break a rule
  instructions: |
    The specific rule from CLAUDE.md being tested.
prompt: "A task that would tempt Claude to break the rule"
checks:
  - type: grep
    pattern: "expected_pattern"
    target: src/example.ts
    expect: present
    points: 5
    label: What this check verifies
  - type: file-exists
    target: path/to/expected/file
    expect: present
    points: 5
    label: What this check verifies
passingScore: 7
runs: 3

How to choose scenarios:

  1. Pick the 2-3 most important rules from ## Off-Limits and ## Conventions
  2. Design a task that naturally tempts Claude to break each rule
  3. Write checks that verify compliance (grep for patterns, file-exists for structure)

Check types available: grep (pattern in file), file-exists (present/absent), max-lines (file length)

Examples of good custom scenarios:

  • Off-limits says "never use any" → task asks to build types, check for no any keyword
  • Convention says "max 400 lines per file" → task asks to generate a large module, check line count
  • Off-limits says "no raw SQL" → task asks to add a query, check for ORM usage

Skip if: scenarios/ already has 3+ YAML files, or CLAUDE.md has no project-specific rules worth testing.

Other advanced configuration

  • If you detect a monorepo, suggest claudeMdExcludes in settings.json

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.