new-ability
FreeNo executable scriptsNot checkedScaffold a new ability with PHP backend, JS chat interface, and test case
by majiayu000★ 31 GitHub starsAbout this skill
Scaffold New Ability: $ARGUMENTS
Before starting
Read these for the full patterns:
- An existing ability PHP file (e.g.,
includes/abilities/cache-flush.php) - An existing ability JS file (e.g.,
src/extensions/abilities/cache-flush.js) docs/ABILITIES-GUIDE.mdfor parseIntent, confirmation, and annotation details
Steps
PHP backend — create
includes/abilities/$ARGUMENTS.php:- Use
register_agentic_ability( 'agentic-admin/$ARGUMENTS', $php_config, $js_config ) - Include
permission_callbackwith appropriatecurrent_user_can()check - Include
input_schemawith top-leveldefaultfield - Include
output_schema - Set
annotations:readonly,destructive,idempotent - Implement
execute_callbackreturning{ success: bool, message: string, ... }
- Use
JS chat interface — create
src/extensions/abilities/$ARGUMENTS.js:- Use
registerAbility( 'agentic-admin/$ARGUMENTS', { ... } ) - Include:
label(string literal),description(string literal),keywords(array),initialMessage,summarize(),interpretResult(),execute() - Set
requiresConfirmationbased on whether the ability is destructive
- Use
Register — add import and call in
src/extensions/abilities/index.jsTest case — add at least one test case in
tests/abilities/core-abilities.test.jsLint — run
npx wp-scripts lint-json the new JS file andcomposer linton the new PHP fileVerify — run
npm run test:abilities -- --file tests/abilities/core-abilities.test.jsto confirm the model selects the new ability correctly
Install new-ability in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the new-ability skill do?
Scaffold a new ability with PHP backend, JS chat interface, and test case
How do I install the new-ability skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the new-ability skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic