skills/tool-author/SKILL.md
Authors and validates LLM tool descriptions and input schemas (Anthropic Tool Use, MCP servers, LangChain @tool, Pydantic, Zod). Use when the user mentions "tool description", "function calling", "MCP tool", "Pydantic schema", "Zod schema", "@tool decorator", "input_schema", "tool spec", "툴 정의", "함수 호출 스키마", or when editing files that define LLM tool surfaces. Enforces the six required attributes (one-line summary, anti-pattern, synonyms, parameter examples, enum constraints, return shape) and blocks the seven known failure modes — wrong-tool selection, skipped tool, malformed arguments, retry loops, user-intent bypass, wrong side-effect, and un-auditable traces. For authoring ASTRA SKILL.md files use /skill-author instead — this skill is for *runtime* LLM tool surfaces, not for skill files themselves.
npx skillsauth add astra-technology-company-limited/astra-methodology tool-authorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Writes a new LLM tool surface (description + input schema) or refactors an existing one to satisfy the 6 required attributes documented in references/six-attributes.md. The validator catches the 7 failure modes in references/failure-modes.md. For Python/TypeScript rendering, see references/python-pydantic.md and references/typescript-zod.md.
Scope: this skill is for runtime LLM tool surfaces that the model invokes during a session — Anthropic
toolsarray, MCPserver.tool(), LangChain@tool, OpenAI function-calling schemas. It is not for authoring ASTRASKILL.mdfiles (use/skill-author).
Determine the mode from arguments or AskUserQuestion:
| Mode | Trigger | Entry point |
|------|---------|-------------|
| new | "write new tool", "add MCP tool", empty target file | Step 1 |
| refactor | existing tool file passed as argument, "improve this tool description" | Step 4 |
| validate | "lint this tool", "check tool description", paths auto-trigger | Step 5 |
The frontmatter paths: covers the most common LLM-tool-file conventions:
| Glob | Matches |
|------|---------|
| tools/**/*.py / tools/**/*.ts | dedicated tool directory |
| mcp/**/*.py / mcp/**/*.ts | MCP server projects |
| **/tools.py | single-file Python convention |
| src/**/*.tool.ts | naming-prefix TypeScript convention |
If a project keeps tool definitions elsewhere (e.g. api/handlers/tools/, lib/agents/), append those globs to the frontmatter. Avoid catch-alls like **/*.py — they drown out other skills.
Ask the four questions at once with AskUserQuestion:
If side-effect risk ≥ "writes data", apply the special handling in Step 6.
The description is the only signal the LLM uses to decide between tools. Apply each attribute from references/six-attributes.md in order:
<verb-led one-line summary, ≤ 80 chars>
Use when <situation 1>, <situation 2>, or when the user mentions
"<keyword>", "<synonym>", "<colloquial>".
Do NOT use for <competing-domain> — use <sibling_tool> instead.
Returns: <shape, units, ordering, nullability>.
Per-parameter, attach an example value and (where applicable) an enum:
<param_name>: <type> — <one-line description>. e.g. '<example>', '<example>'
| Question | If "no" |
|----------|---------|
| Does the first line start with a verb? | Rewrite |
| Is there at least one Do NOT use clause? | Add one |
| Are synonyms / colloquial phrasings covered? | Add them |
| Does every parameter have an example? | Add examples |
| Are finite value spaces declared as enums? | Convert to Literal / z.enum |
| Is the return shape documented? | Document it |
Switch on the language chosen in Step 1:
references/python-pydantic.md. Prefer Pydantic BaseModel over hand-written JSON Schema. The model docstring carries the description; per-field Field(description=...) carries parameter docs.references/typescript-zod.md. Compose the description string with [...].join("\n") for readability; co-locate it with the Zod schema.python-pydantic.md §7. Same six attributes apply; the validator does not care where the schema came from.Keep nesting ≤ 2 levels. If the input shape would need 3+ levels, flatten it with prefixed keys.
Read)description = """...""" or the description: key)references/validation-greps.mdAskUserQuestion): no anti-pattern, no synonyms, free-string where enum is possibleFor side-effect tools, any missing attribute escalates to P0 — see Step 6.
Run the validation pass without modifying files. Use it as a CI gate, a PR pre-check, or whenever a paths-matched file is edited.
# From the repository root
grep -nE "description\s*=\s*['\"]" <path> # locate descriptions
grep -nE "Field\(" <path> # locate Pydantic fields
grep -nE "\.describe\(" <path> # locate Zod descriptions
The full pattern list — including the "Do NOT use" detection, enum detection, and return-shape detection — is in references/validation-greps.md. The patterns live in a reference file because grep meta-characters inside SKILL.md body would false-positive against themselves.
Emit a table:
| Tool name | A1 | A2 | A3 | A4 | A5 | A6 | Severity |
|-----------------|----|----|----|----|----|----|----------|
| create_issue | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | PASS |
| search_users | ✓ | ✗ | ✗ | ✓ | n/a| ✓ | P1 |
Ax columns map 1-to-1 to the six attributes. n/a is allowed when an attribute does not apply (e.g., a tool with no enumerable fields).
Tools that mutate state (DB writes, payments, sent messages, file creation) are the most expensive to get wrong. Apply two extra requirements on top of the six attributes:
Create, Update, Delete, Send, Charge, Publish. Avoid neutral verbs like Process, Handle, Run.Do NOT use clause must point at the read-only sibling tool by name. Example: "Do NOT use to check whether an issue exists — use get_issue."In the validator, side-effect tools get any missing attribute auto-escalated to P0. Severity rationale lives in failure-modes.md §"Why side-effect tools are special".
If the side-effect is irreversible (charges money, sends an email, posts to Slack), also recommend disable-model-invocation: true at the calling layer, or — for MCP — a confirmation step before the side effect fires.
Before declaring the tool done:
Do NOT use for ... — use <other_tool> instead. clausee.g. example or a Literal / z.enum constraintAny / unknown / **kwargs / z.record(z.unknown()) as a catch-allStep 5) reports PASSIf any item fails, return to Step 2 (refactor mode) for the offending tool.
Per ASTRA BP §9, write at least 3 scenarios in references/evals.md covering:
get_x vs search_x with overlapping descriptions, validator flags the overlapBaseline by running the same scenarios without this skill and comparing description quality.
Reference index
| Need | File |
|------|------|
| The 6 attributes (SSoT) | references/six-attributes.md |
| Failure modes + severity ladder | references/failure-modes.md |
| Python / Pydantic rendering | references/python-pydantic.md |
| TypeScript / Zod rendering | references/typescript-zod.md |
| Validation grep patterns | references/validation-greps.md |
| Evaluation scenarios | references/evals.md |
tools
Runs UAT (User Acceptance Testing) cases in TRUE PARALLEL using Playwright Test runner with isolated browser contexts per worker (separate cookies, localStorage, sessionStorage). Solves the two main limits of /user-test: (1) sequential single-page execution that does not scale beyond a few cases, and (2) one stuck case blocking the rest of the run. Reuses 100% of the /user-test UAT case Markdown+YAML format under docs/tests/uat-cases/, runs them via `npx playwright test --workers=N`, and emits the same report layout (index.html + issues.md + session.json + screenshots/) under docs/tests/uat-reports/. Use when the user asks to "run UAT in parallel", "speed up UAT", "test multi-user", "song song", "uat parallel", or runs /uat-parallel. Distinct from /user-test (sequential Chrome MCP, supports interactive mode), /test-run (developer integration tests), /test-scenario (scenario authoring).
tools
Performs end-user UAT (User Acceptance Testing) by driving a real browser through Chrome MCP, self-verifying each step with hard assertions (DOM / Network / URL / Console), auto-assigning severity on failure, and emitting an HTML report plus issues.md into a timestamped session folder. Supports two modes: interactive (URL + Vietnamese natural-language flow description) and --auto (batch-run pre-authored test cases under docs/tests/uat-cases/). Use when the user asks for "UAT", "user acceptance test", "kiểm thử người dùng", "regression test", or runs /user-test, /uat. Distinct from /test-run (developer-authored technical integration testing) and /test-scenario (scenario authoring from blueprints).
development
Creates new SKILL.md files or refactors existing skills to comply with the ASTRA skill best practices guide (docs/development/skill-best-practices.md). Use when user mentions "new skill", "create skill", "SKILL.md", "skill authoring", "스킬 작성", "스킬 만들기", or when editing any file matching skills/**/SKILL.md.
tools
Audits existing UI components/pages/CSS against docs/design-system/DESIGN.md and applies fixes to restore design consistency. Uses design-token-validator to detect hardcoded color/font/spacing violations, and invokes designer-persona to report a senior-perspective score (0-10) and anti-AI aesthetic violations (generic shadcn look, purple gradient cliché). Fixes are applied automatically (--apply) or proposed as a PR (--pr); after changes, design-token-validator is re-run and must PASS before completion. Input: target directory (e.g., src/components/Button), single file, or git diff. Output: audit report (docs/design-system/audit-{date}.md) + fix proposals + application results.