create-project-skills
Create-project-skills scans the codebase to identify and document project-specific conventions in naming, file organization, framework usage, data access patterns, error handling, and testing. It generates individual skill files capturing these inferred conventions into a specified skill directory so future Claude sessions automatically inherit project best practices. Use this when asked to extract skills, codify patterns, or mine the repository for conventions to formalize.
git clone --depth 1 https://github.com/tobihagemann/turbo /tmp/create-project-skills && cp -r /tmp/create-project-skills/claude/skills/create-project-skills ~/.claude/skills/create-project-skillsSKILL.md
# Create Project Skills Generates one skill per detected convention area in the project's skill directory so future Claude or Codex sessions auto-load them when working in the repo. ## Task Tracking At the start, use `TaskCreate` to create a task for each phase: 1. Survey codebase 2. Extract patterns in parallel 3. Evaluate patterns 4. Propose skill list 5. Run `/create-skill` skill ## Step 1: Survey Codebase If `$ARGUMENTS` specifies paths, scope the scan to those paths; otherwise scan the whole repository. Build the extraction context: 1. Detect primary languages and frameworks from manifest files (`package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Package.swift`, `pom.xml`, `Gemfile`, and others appropriate to the stack). 2. Map the top-level source directory structure and note test directory conventions. 3. Read `CLAUDE.md`, `.claude/rules/`, `AGENTS.md`, and any `.cursor/rules` or `.cursorrules`. Note the conventions already documented there. The generated skills must not duplicate them. 4. Determine the target skill directory: - Check candidate paths `.claude/skills/` (Claude Code), `.agents/skills/` (Codex), and a top-level `skills/` directory (match case-insensitively so `Skills/` or similar non-standard casing is detected too). Resolve symlinks so co-linked paths are treated as one logical location. - Use `AskUserQuestion` to confirm where generated skills should live. List each distinct resolved location as an option, noting any symlink alias in the option description. If `.claude/skills/` is not among the detected locations, include it as a default option. The auto-added "Other" option lets users specify a custom path such as a project-specific directory. 5. In the chosen target directory, list existing skills. For each, record the skill name, the description from SKILL.md frontmatter, and the first `##` section heading from the body. These signals feed rename-conflict detection in Step 3. Output a short text summary of detected stack, top-level layout, chosen target directory, and existing skills before moving on. ## Step 2: Extract Patterns in Parallel Read [references/pattern-extractor.md](references/pattern-extractor.md) to see the full taxonomy of pattern categories. Decide which categories apply to the detected stack (e.g., drop "Styling and UI" for a backend service, drop "State management" for a static-analysis tool). Use the Agent tool to launch all extraction agents below in a single assistant message so they run concurrently. Each Agent call uses `model: "opus"` and does not set `run_in_background`. Launch one Agent per applicable category and state the total count explicitly when emitting the calls. Each agent's prompt must: - Name its assigned category - Include the stack summary and directory map from Step 1 - Include the list of conventions already documented in `CLAUDE.md` and `.claude/rules/` so duplicates are skipped - Instruct the agent to read [references/pattern-extractor.md](references/pattern-extractor.md) as its role brief and return findings in the format defined at the end of that file ## Step 3: Evaluate Patterns Aggregate findings from all agents. For each finding, score three axes: - **Consistency**: what share of eligible sites follow the pattern? Drop findings below 30%. Flag findings between 30–70% as "mixed" for Step 4 review. - **Intentionality**: does the pattern appear across multiple subsystems and recent commits, or is it isolated? Drop findings confined to a single legacy module unless docs or lint config explicitly mark them as the desired convention. - **Modernity**: does the pattern align with current best practices for the stack? Flag patterns that contradict current idioms (e.g., pre-hooks class components in a React codebase also using hooks elsewhere) as "legacy" for Step 4 review. Group the surviving findings by topic into candidate skills. Each candidate typically covers one category, but related categories may merge if the patterns are tightly coupled. Split a candidate into two skills if its patterns cover clearly distinct sub-topics. For each candidate skill, produce: - A proposed `name` (kebab-case, narrow to the topic, e.g., `swift-naming`, `react-state`, `api-clients`) - A one-line description with trigger phrases (e.g., "Use when writing or reviewing <topic>...") - 3–8 concrete convention statements with evidence citations (`file:line`) - A **Status** tag based on disk comparison: - **New**: no skill with that name exists in the target directory. - **Update**: a skill with the same name exists in the target directory. Produce a unified diff against the current SKILL.md body. - **Rename conflict**: an existing skill in the target directory has a name, description, or first-section heading that covers the same topic under a different name. Flag for user decision. If rename-conflict detection is ambiguous from the Step 1 signals alone, read the existing skill's SKILL.md body and compare convention statements before finalizing the Status tag. ## Step 4: Propose Skill List Output the full proposal as text first, not inside `AskUserQuestion`. For each candidate skill, show: - Status tag, proposed name, one-line description - The 3–8 convention statements with evidence - For Update status, the unified diff - For Rename conflict status, the existing skill name and the overlap summary After all candidates are listed, use `AskUserQuestion` to confirm the proposal with these options: "Approve all", "Make edits", "Cancel". If the user selects "Make edits", continue in conversation so the user can specify which candidates to drop, merge, or rename before returning here. For each Rename conflict candidate, use a separate `AskUserQuestion` asking whether to update the existing skill, create the new one alongside it, or skip. ## Step 5: Run `/create-skill` Skill Build the batch from approved candidates only. Do not include anything not explicitly approved in Step 4. Output all approved cand
For each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".
Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".
Project-wide health audit pipeline that fans out to all analysis skills in parallel, evaluates findings, and produces a unified report at .turbo/audit.md. Use when the user asks to \"audit the project\", \"run a full audit\", \"project health check\", \"audit my code\", \"codebase audit\", or \"comprehensive review\".
Shared changelog conventions and formatting rules referenced by $create-changelog and $update-changelog. Not typically invoked directly.
Enforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.
Run autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".
Run AI-powered code review using the codex CLI. Use when the user asks to \"codex review\", \"run codex review\", or \"review a commit with codex\".
Shared commit message rules and technical constraints referenced by $stage-commit and $commit-staged. Not typically invoked directly.