docs / local-skills

Local Skills

promptconduit skills generate --local analyzes your AI coding transcripts, detects repeated workflows, and writes them as reusable Claude Code skills (SKILL.md files you run as slash commands). It reads transcripts from your disk, uses your own AI subscription or API key for the analysis, and needs no PromptConduit account.

Free forever

No platform account needed. Uses your existing Claude Code subscription or Anthropic API key.

What a local skill is

A skill is a Markdown file at .claude/skills/<name>/SKILL.md with a short YAML header (name, description) and a body of instructions. Claude Code loads skills from ~/.claude/skills/ (global) and from .claude/skills/ in the current project. You can run one explicitly as /<name>, and Claude can also pick it up on its own when your request matches the description.

"Local" means the skills are mined from your own history on your own machine, rather than from transcripts synced to the platform. If you keep typing the same multi-step request ("check CI and fix whatever's red", "review this diff against our conventions"), a local skill turns it into one command. For why this pays off, see Adopt skills and slash commands.

Usage

bash
# Analyze the current project: conversations whose repo matches this
# directory's repo, written to <repo root>/.claude/skills/
promptconduit skills generate --local

# Analyze everything, across all projects, written to ~/.claude/skills/
promptconduit skills generate --local --repo ''

# Analyze only Claude Code transcripts
promptconduit skills generate --local --tool claude-code

# Scope to a repo by name (the repo or directory name, not owner/repo)
promptconduit skills generate --local --repo my-project

# Re-analyze previously seen transcripts
promptconduit skills generate --local --force

# Preview what would be generated (no files written)
promptconduit skills generate --local --dry-run

Flags

FlagDefaultEffect
--localoffRun on your machine. Without it, skills generate uses the platform and needs an API key.
--toolallWhich transcripts to read: claude-code, codex, copilot, or all.
--repoauto-detectedOnly analyze conversations from this repo. Defaults to the current directory's repo name (from the origin remote, else the directory name), so a run is always scoped unless you pass --repo '' for global.
--forceoffInclude transcripts that were already analyzed in an earlier run.
--dry-runoffPrint the detected skills without writing files or updating state.

AI Provider Auto-Detection

The CLI selects an AI provider automatically, in priority order:

PriorityProviderRequirement
1Claude Codeclaude CLI binary in PATH (runs claude --print with the Haiku model)
2Anthropic APIANTHROPIC_API_KEY env var (uses Claude Haiku 4.5)
3OpenAIOPENAI_API_KEY env var (uses gpt-4o-mini)

The first match wins: if claude is on your PATH, it is used even when an API key is also set. Each analysis is a single request with a 120-second timeout.

How It Works

  1. Pick a provider from the table above. With none available, the command stops and lists the three options.
  2. Find transcripts. The CLI walks each tool's transcript directory (see Transcript Sources) and parses every session file, newest first. These files are written by the AI tools themselves, so no hooks are required.
  3. Scope. Unless you pass --repo '', only conversations from one repo are kept: the one named by --repo, or the current directory's. A Claude Code conversation's repo is the name of the directory it ran in. At most 50 conversations are used, newest first from Claude Code, then Codex, then Copilot CLI.
  4. Skip what's been seen. Analyzed transcripts are tracked by SHA256 hash in ~/.config/promptconduit/local_skills_state.json to avoid reprocessing. --force ignores this.
  5. Require enough history. At least 5 conversations are needed to detect patterns. --force helps when you have 5 or more that were analyzed before; it can't lower the minimum.
  6. Detect. The CLI builds a compact summary of each conversation and asks the provider for 3–4 workflows that repeat across them. Each comes back with a kebab-case name, a type (workflow, command, template, or checklist), trigger phrases, a confidence score, and the skill body.
  7. Write. Each skill is saved to <name>/SKILL.md: under <git root>/.claude/skills/ when the run is scoped and you're inside a git repo, otherwise under ~/.claude/skills/. The analyzed transcripts are then recorded in the state file.

Output Example

output
Analyzing 47 local transcripts (global)...
Using Claude Code (claude CLI).

Detected 3 skills:

  /git-commit-workflow  (workflow, 94%)
    Git Commit Workflow
    Stage, commit, and push with conventional commit format.
    → Written to: /Users/you/.claude/skills/git-commit-workflow/SKILL.md

  /ci-monitor  (workflow, 91%)
    CI Monitor
    Check CI status and iterate until green.
    → Written to: /Users/you/.claude/skills/ci-monitor/SKILL.md

  /code-review  (checklist, 88%)
    Code Review
    Review changes for quality, security, and conventions.
    → Written to: /Users/you/.claude/skills/code-review/SKILL.md

3 skills written. Use them with /git-commit-workflow, etc.
Review and delete ~/.claude/skills/<name>/ for any you don't want.

This is a global run (--repo ''); a scoped run prints the repo name in place of global. When transcripts come from more than one tool, the header also prints a session count per tool.

Example SKILL.md

Every generated file has the same shape: frontmatter with the skill name and a description that includes its trigger phrases (so Claude knows when to use it), a body kept under about 120 words, and an attribution line with the confidence score.

markdown
---
name: ci-monitor
description: "Check CI status and fix failures until green. Prompts like: 'how is CI doing?', 'check if CI is passing', 'fix the failing tests in CI'"
---

Check CI pipeline status and fix failing jobs until green.

## When to Use
When CI is failing or you need the pipeline green before merging.

## Steps

1. Run: gh run list --limit 10
2. For failures: gh run view RUN_ID --log-failed
3. Fix errors, re-run: gh run rerun --failed RUN_ID
4. Repeat until all checks pass.

## Example
/ci-monitor

---
*Generated locally by PromptConduit · Confidence: 90%*

Review, edit, and remove skills

  • Preview first. --dry-run prints each skill's name, type, confidence, and description without writing anything or marking transcripts as analyzed.
  • Edit freely. Generated files are plain Markdown. Tighten the steps, swap in your real commands, or narrow the description so the skill triggers only when you want it.
  • Protect your edits. A later run that detects a skill with the same name overwrites that SKILL.md. Rename the directory and the name: field of a skill you've customized, or commit project skills to git so you can diff and restore.
  • Remove. Delete the skill's directory, e.g. rm -r ~/.claude/skills/ci-monitor. promptconduit skills uninstall only removes skills installed from the platform with skills install; it never touches locally generated ones.
  • Start over. Delete ~/.config/promptconduit/local_skills_state.json (or use --force) to analyze everything again.

Privacy

Nothing is sent to PromptConduit: local mode makes no calls to the PromptConduit API and works without an account or API key. Transcripts are read in place and never copied or uploaded.

The analysis does go to the AI provider you use. For each conversation (at most 50), the CLI sends its title, summary, tool-call and message counts, and the first three of your prompts, each cut to 120 characters, plus the repo name when scoped. Tool output, file contents, and assistant replies are not sent. With the claude CLI the request runs under your Claude Code login with session persistence off; with an API key it goes straight to Anthropic or OpenAI under that key's terms. The CLI's separate anonymous daily usage ping never includes prompts, paths, or repo names (see Configuration to turn it off).

Transcript Sources

ToolTranscript Location
Claude Code ~/.claude/projects/**/*.jsonl
OpenAI Codex CLI ~/.codex/**/*.{jsonl,json}
GitHub Copilot CLI ~/.copilot/{session-state,history-session-state}/**/*.{jsonl,json}

Cursor and Gemini CLI transcripts aren't used for local skills; their events are still captured by hooks (see Supported Tools).

Troubleshooting

MessageWhat to do
no AI provider found Install Claude Code, or export ANTHROPIC_API_KEY or OPENAI_API_KEY in the shell you run the command from.
no transcripts found None of the supported tools has written a session yet. Use one for a while, or check --tool. The message suggests installing hooks, but hooks aren't needed for local skills.
no transcripts found for repo "…" The auto-detected repo name doesn't match the directory your sessions ran in. This happens outside a git repo (the current directory's name is used, e.g. your home folder), and with worktrees or clones whose directory differs from the remote's name. Pass --repo with the directory name, or --repo '' for global. Running from outside a repo does not make the run global.
Need at least 5 conversations… There aren't 5 conversations in scope. Widen the scope with --repo '' or --tool all, or come back after more sessions.
No new transcripts to analyze. Everything in scope was analyzed in an earlier run. Add --force to analyze it again.
claude CLI error: … Run claude once interactively to confirm you're signed in. To use an API key instead, run from a shell where claude isn't on PATH.
A skill doesn't show up as /name Check where it was written: project-scoped skills only load in that repo. --dry-run always prints ~/.claude/skills/ as the target, even for project-scoped runs. Start a new Claude Code session if it still isn't listed.

Next steps

New to PromptConduit? The Quick Start and Installation pages get the CLI on your machine. Every skills subcommand, including the platform flow (skills list, skills install, skills sync), is in the CLI Reference.