AgentSkillsCN

prompt-classifier

Claude Code CLI 的快速意图路由工具。只需不到 5 个标记即可完成分类——输出 CLASS 以及 1–3 个起步步骤。这里无需冗长的序列。

SKILL.md
--- frontmatter
name: prompt-classifier
description: Fast intent router for Claude Code CLI. Classifies in <5 tokens → outputs CLASS + 1–3 starter steps. No long sequences here.
priority: highest
triggers: always (unless /noclassify)

Prompt Classifier – Minimal Intent Router

You are the entry point. Classify fast. Delegate detail to downstream skills.

Pre-check – Resume

  • If .claude-state.md exists → CLASS: RESUME (overrides everything)

Classification Rules (exact order, first match wins)

  1. RESUME → .claude-state.md exists
  2. PLANNING → plan, how to, step by step, roadmap, architecture, strategy, approach, where to put, refactor large
  3. UI_DESIGN → design, UI, layout, style, tailwind, css, component design, page design, aesthetic, beautiful
  4. IMPLEMENT → implement, add, create, build, new, generate, scaffold, setup, write
  5. EDIT → refactor, fix, change, update, improve, rename, move, extract, rewrite, optimize
  6. DEBUG → error, bug, failing, crash, not working, broken, issue, exception, wrong output
  7. DEPS → dependency, install, upgrade, add package, conflict, outdated
  8. TEST → test, write test, coverage, vitest
  9. VERIFY → verify, check, lint, build, typecheck
  10. SECURITY → secure, auth, zod, secret, vuln, csrf
  11. EXPLAIN → explain, what is, how does, difference between
  12. RESEARCH → best library, recommend, compare, alternative

Default: IMPLEMENT

Output Format – exact, nothing else

CLASS: <one of: RESUME|PLANNING|UI_DESIGN|IMPLEMENT|EDIT|DEBUG|DEPS|TEST|VERIFY|SECURITY|EXPLAIN|RESEARCH>

SEQUENCE:

  1. <first skill or tool>

CLARIFY: <yes/no> # only if truly ambiguous

If CLARIFY yes → one short question

Starter sequences (short – downstream skills chain the rest)

When CLASS: RESUME SEQUENCE:

  1. error-recovery

When CLASS: PLANNING or IMPLEMENT or EDIT SEQUENCE:

  1. plan-structure

When CLASS: UI_DESIGN SEQUENCE:

  1. frontend-design

When CLASS: DEBUG SEQUENCE:

  1. debug-tracer

When CLASS: DEPS SEQUENCE:

  1. dependency-guardian

When CLASS: TEST SEQUENCE:

  1. test-writer

When CLASS: VERIFY SEQUENCE:

  1. verification-guardian

When CLASS: SECURITY SEQUENCE:

  1. security-overseer

When CLASS: EXPLAIN or RESEARCH SEQUENCE:

  1. explain-code

Persistence (minimal)

On new session (no .claude-state.md):

  • After CLASS + SEQUENCE → write ".claude-state.md" with prompt + class + starter sequence

Downstream skills must call edit ".claude-state.md" to append progress.

commit-orchestrator deletes .claude-state.md on success.

Never explain. Never show reasoning. Only output the CLASS / SEQUENCE / CLARIFY block.

If /noclassify → reply "Classifier disabled."