Getting started¶
Requirements¶
Node.js 20 or newer for the validator, the command, and the checks. The skills themselves are plain Markdown and need nothing.
Install into your project¶
Run this from the root of your project:
It copies every skill to .agents/skills/ and every rule to .agents/rules/. Nothing is downloaded after the package itself.
To choose skills, or to write them where your agent looks:
npx @sadrmanesh/commerce-agent-skills list
npx @sadrmanesh/commerce-agent-skills add woocommerce-plugin-development stripe-payments
npx @sadrmanesh/commerce-agent-skills init --layout root
npx @sadrmanesh/commerce-agent-skills init --skills-dir path/to/skills --rules-dir path/to/rules
--no-rules skips the rules, --force replaces installed skills, and --dry-run prints the plan. See Command line and Installation.
Work on the library¶
git clone https://github.com/sadrmanesh/commerce-agent-skills.git
cd commerce-agent-skills
node scripts/validate-skills.mjs
How an agent uses a skill¶
- The agent reads each skill's
nameanddescriptionand decides whether the skill applies to the task. - When it applies, the agent reads the
SKILL.mdbody and follows the procedure. - Reference files and scripts are loaded only when the skill points to them, which keeps the context small.
Rules work differently. A skill is for a task. A rule is for every task in that area, so it is short enough to stay loaded all the time. See Rules.
Check an answer¶
Every skill ships evaluation fixtures. Give an agent the task text and check the reply:
import { checkAnswer } from "./scripts/lib/evals.mjs";
const errors = checkAnswer(reply, {
must_include: ["wc_get_order"],
must_not_include: ["update_post_meta"],
});
An empty list means the reply passed the checks.
To score many replies at once, save each one as answers/<skill>/<task-id>.md and run the eval runner:
It prints a score per skill and exits with status 1 below the threshold. See Evaluation fixtures.
Next steps¶
- Browse the skill catalog.
- Read the skill format before writing a new skill.
- Read Contributing before opening a pull request.