stacks-writing-for-agents

Guides writing and editing SKILL.md files, AGENTS.md, and agent-facing reference documents in Stacks projects.

625|19|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-writing-for-agents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-writing-for-agents
Source: https://github.com/stacksjs/stacks/tree/main/storage/framework/defaults/ai/skills/stacks-writing-for-agents
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-writing-for-agents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agent-facing documents like SKILL.md files and AGENTS.md degrade over time: descriptions fail to trigger, content duplicates across files, and stale lines accumulate. This Skill provides a disciplined model for writing documents that AI agents consume, covering context pointers, information hierarchy, completion criteria, leading words, and pruning so every line changes agent behavior.

Core Features & Use Cases

  • Context pointer design: Write skill descriptions and AGENTS.md lines that front-load trigger words, name distinct branches, and carry a Covers clause so agents reliably reach the right material.
  • Information hierarchy and progressive disclosure: Decide what stays inline as steps or reference versus what moves behind a pointer into disclosed reference files, preventing document sprawl.
  • Skill mechanics for Stacks: Covers frontmatter validation rules, model-invoked versus user-invoked skills, the app/Skills override model, and what buddy setup:ai materializes.
  • Use Case: When adding a new skill under app/Skills/ or editing a bundled one in storage/framework/defaults/ai/skills, apply this Skill to write a compliant frontmatter, structure the body, and prune no-op sentences before committing.

Quick Start

Use the stacks-writing-for-agents skill to review and rewrite my new SKILL.md so its description triggers reliably and the body follows the information hierarchy.

Frequently Asked Questions about stacks-writing-for-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a SKILL.md description that triggers reliably?

Front-load the leading trigger word, list one distinct branch per trigger case, and end with a Covers clause naming the package and config file. Follow the shape: Use when <situation> - <branch>, <branch>. Covers <package> and <config file>.

How do I add a new skill to a Stacks project?

Create app/Skills/<name>/SKILL.md with valid frontmatter; listSkills() picks it up immediately with no registration step. Re-run buddy setup:ai <agent> to link it into your agent's directory, and add a row to the feature-to-skill table in AGENTS.md.

What frontmatter rules does the Stacks skill validator enforce?

validateSkill() requires a name of 1-64 lowercase letters, numbers, and hyphens that equals the directory name, plus a description of at most 1024 characters. Descriptions must also avoid bare colons and em-dashes, which the parsers and project rules reject.

What is the difference between model-invoked and user-invoked skills?

Model-invoked skills keep their description loaded so the agent and other skills can reach them, paying permanent context load. User-invoked skills set disable-model-invocation: true, hiding the description so only a human typing the name can fire them.

When should I split one skill document into two?

Split by sequence when visible later steps tempt the agent to rush the current step's completion criterion. Split by invocation when a distinct trigger word should fire independently or another skill must reach the material.