From claude-skills
Use when the user wants to rewrite a rough prompt for clarity, specificity, context richness, and structure, or asks to 'melhorar prompt', 'refinar prompt', 'reescrever prompt', 'deixar mais claro'. Scans the codebase (Glob/Grep) to substitute concrete file paths and symbols when the rough prompt only implies them. Outputs only the improved prompt — no Original / What Changed sections. Manual invocation only via /improve-prompt [rough-prompt-text].
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:improve-prompthaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
The user invoked this with: $ARGUMENTS
The user invoked this with: $ARGUMENTS
If $ARGUMENTS is empty or contains only whitespace, output exactly:
Provide the rough prompt you want improved as an argument, for example:
/improve-prompt fix the auth bug
Then stop — do not attempt a rewrite, do not ask a clarifying question.
Otherwise, treat everything in $ARGUMENTS as the rough prompt and proceed.
Skim the rough prompt for cues that imply concrete code references but don't name them. Each cue triggers a scan in Stage 3:
| Cue in prompt | What to resolve |
|---|---|
| "the X middleware", "the X handler", "the X module" | actual file path of the named module |
| "the auth flow", "the login flow", "the db layer" | files implementing that subsystem |
| "database credentials", "API keys", "secrets" | files with connection strings, process.env.*, config loaders |
| "the bug in " with no file named | likely owner files of that feature |
| "the code", "this codebase", "the app" with no specifics | top-level entry points and config |
| Verb-only ("fix it", "refactor", "update") with no target | abort scan — placeholder route only |
If no cue is present, skip Stage 3 entirely and go to Stage 4. Do NOT proceed to Stage 4 until cue detection has run on the full $ARGUMENTS.
Run at most 4 targeted operations total — Glob and Grep combined. Do not load whole files; read only when a Glob/Grep hit needs disambiguation.
Patterns by cue type:
Glob "**/auth*.{ts,js,py,go,rs,rb}" and Glob "**/*middleware*.{ts,js,py,go,rs,rb}"Grep "login\|signIn\|authenticate" with output_mode: files_with_matchesGrep "DATABASE_URL\|DB_HOST\|process\.env\|os\.environ\.get\|connection_string" plus Glob "**/{db,database,connection,config,env}*.{ts,js,py,go,yaml,yml,json}"Glob "{package.json,pyproject.toml,Cargo.toml,go.mod,*.csproj}" for stack identificationStop early when:
Record the resolved paths/symbols for Stage 4.
Apply these four dimensions only where the rough prompt is weak. Do not mechanically apply all four:
@file <path> when Stage 3 resolved a path. If a stack constraint (language, framework, version) is detectable from scan results (e.g. package.json showed Next.js), include it.When Stage 3 resolved paths or symbols, substitute them directly — drop the [placeholder]. When Stage 3 did not resolve a piece of context, leave a tight bracketed placeholder (e.g. [describe symptom]).
Render the user's task in clearer words but never lose the user's intent.
Output only the improved prompt inside a single triple-backtick fenced code block. Do NOT emit ## Original, ## What Changed, or any other heading. Do NOT narrate what you scanned.
Output language MUST match the input language. If $ARGUMENTS is in PT-BR, the rewritten prompt is in PT-BR. If EN, EN. NEVER translate the user's intent into a different language. Technical terms (file paths, commands, function names, env-var names, library names) stay untranslated regardless of the surrounding prose language.
Example output:
[the rewritten prompt — single code block, copy-paste ready]
If any bracketed placeholders remain in the rewrite (Stage 3 could not resolve them), append exactly one line below the fenced block:
⚠️ To sharpen further, add: [comma-separated list of context items that would resolve the remaining placeholders]
Do not add the sharpen note when every placeholder was resolved by the scan.
User runs /improve-prompt fix the auth bug.
Glob "**/auth*.{ts,js,py,go,rs,rb}" → src/auth/middleware.ts, src/auth/login.ts. Then Grep "expir" in those files → hit on middleware.ts:47 (if (token.exp < Date.now())).In @file src/auth/middleware.ts (line 47), the token expiry check uses `<` instead of `<=`. Fix that comparison and run `npm test -- auth` to verify no regressions. Do not refactor the surrounding handler.
User runs /improve-prompt fix it.
Identify and fix the bug in [specify the target file] causing [describe symptom]. After fixing, run the relevant tests to confirm the regression is resolved.
⚠️ To sharpen further, add: which file or feature is affected, and what the expected vs actual behavior is.
User runs /improve-prompt coferir se o codigo usa dados de banco e url host no banco e no codigo.
Glob "**/{db,database,connection,config,env}*.{ts,js,py,go,yaml,yml,json}" → src/db/client.ts, config/database.yml. Then Grep "DATABASE_URL\|DB_HOST\|process\.env" → hits in those two files.Audit @file src/db/client.ts and @file config/database.yml to verify that database credentials and host URLs are not hardcoded in the application code. Confirm each connection value reads from `process.env.*` (or the documented secrets manager) — flag any string literal that bypasses the env layer. Document each violation with file:line and the remediation path.
## Original or ## What Changed.Read, Glob, Grep only.@file <path> or directly named) — no stray [target file] placeholders left over a successful scan.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jnerytech/claude-skills --plugin claude-skills