Skip to content

Playbook templates: instructions for AI agents - #283

Open
penhouetp wants to merge 5 commits into
chore/playbook-templates-contribution-flowfrom
docs/agent-instructions-playbook-templates
Open

penhouetp wants to merge 5 commits into
chore/playbook-templates-contribution-flowfrom
docs/agent-instructions-playbook-templates

Conversation

@penhouetp

Copy link
Copy Markdown
Contributor

Why

More and more contributors work with an AI coding agent (Claude Code, Codex, Cursor, Copilot...). Without instructions, an agent will happily write a template from scratch, type action UUIDs from memory, put a pasted API key in a command, or leave a customer's URLs and IOC collection ids in the file. This gives it the same rules as the human guide, plus what it must never do.

Based on #281 (it relies on the guide and the tools added there). GitHub will retarget it to main once #281 is merged.

What this adds

  • AGENTS.md (read by most agents; CLAUDE.md links to it): what this public repository holds, rules for every change (no secrets or customer data; playbooks/templates/ and events/lookups.json are live product content), and a pointer to the skill below.
  • .agents/skills/playbook-template/SKILL.md (.claude/skills links to .agents/skills, as in other Sekoia repositories):
    1. start from a playbook that ran, export it with the key from the environment;
    2. replace every value of the user's environment with _to_update_ and show them;
    3. complete name, description, tags;
    4. run the check, then review what no static check sees: trigger, event fields that exist, events[0] only, set instead of append in a loop, dead branches, description vs playbook;
    5. open the pull request (and ask the user for the run screenshot);
    6. how to review a template pull request.
  • playbooks/README.md: one line telling contributors their agent finds these instructions.

Tested

With Claude Code in a copy of the repository:

  • it lists playbook-template as a project skill and reads AGENTS.md through CLAUDE.md;
  • given a pasted (fake) API key, a FRA2 community and a playbook UUID, it warned that the key was now in the chat and should be revoked, used SEKOIA_API_KEY from the environment only, picked the FRA2 API URL, ran the check on the changed file only, and listed the section 2 and 4 reviews and the screenshot request.

🤖 Generated with Claude Code

- AGENTS.md: what this public repository holds, rules for every change (no
  secrets or customer data, files that are live product content), and a pointer
  to the playbook template skill. CLAUDE.md links to it.
- .agents/skills/playbook-template/SKILL.md: start from a playbook that ran and
  export it with the API key from the environment, remove every value of the
  user's environment, complete the file, run the check, review what no static
  check sees (trigger, event fields, events[0], append in loops, dead branches),
  then open the pull request. Also how to review a template pull request.
  .claude/skills links to .agents/skills, as in other Sekoia repositories.
- playbooks/README.md: tell contributors that their agent finds these
  instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
penhouetp and others added 4 commits December 1, 2026 17:30
Co-authored-by: JBR <jean-baptiste.renard@sekoia.io>
Co-authored-by: JBR <jean-baptiste.renard@sekoia.io>
Co-authored-by: JBR <jean-baptiste.renard@sekoia.io>
Co-authored-by: JBR <jean-baptiste.renard@sekoia.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants