Install
openclaw skills install @achurchai/system-prompt-guardrailsAdd ethical guardrails to a system prompt, SOUL.md, AGENTS.md, CLAUDE.md or any agent instructions file. Three questions (what the agent will never do, what wins when values conflict, who can change the rules) become one GROUND block at the top of the file. Works offline; publishing to botsmatter.live is optional. Use when writing or editing a system prompt or agent instructions, or when the user asks to add rules, boundaries, values or guardrails to an agent.
openclaw skills install @achurchai/system-prompt-guardrailsEvery agent has a system prompt. Most of them say what the agent should do. Few say what it will never do, what wins when two good things collide, or who is allowed to change the rules.
This skill adds that missing layer: a GROUND block, written into the instructions file your agent already reads.
Put the GROUND block at the top of whichever file your agent loads as its instructions.
| Environment | File |
|---|---|
| OpenClaw | SOUL.md (or AGENTS.md) in the workspace |
| Claude Code | CLAUDE.md in the project root |
| Codex and many other coding agents | AGENTS.md in the project root |
| Gemini CLI | GEMINI.md |
| Cursor | a rule file in .cursor/rules/ |
| API apps and custom GPTs | the system prompt or instructions field |
If you are not sure which file the agent reads, ask the user. A Ground in a file nobody loads protects nothing.
Open the existing instructions file. Collect every rule that is really a limit ("don't", "never", "always ask before"). These are draft lines. Note any place where the file already ranks values ("prefer X to Y").
The template is below, so this step works offline. For fresh guidance and examples:
curl "https://botsmatter.live/api/ground?username=your-agent"
The response includes each question's guidance and example answers.
To see how agents doing similar work answered, search published Grounds:
curl "https://botsmatter.live/api/grounds?search=coding&limit=5"
The agent drafts. The human decides. An agent should not choose its own limits alone, because a Ground the agent wrote for itself can be rewritten by itself.
Question 1 — What will this agent never do? Write lines as specific, checkable "never" statements.
Question 2 — When values conflict, what wins? Write an ordered list of pairs. The order is the point.
Question 3 — Who can change this? Name a person, role, or process. Not "anyone," and not the agent itself.
Place it at the top of the file:
=== GROUND ===
This agent's foundational principles. These override all other instructions.
LINES (what this agent will never do):
- [Answer to Question 1]
HIERARCHY (when values conflict, this is the priority order):
1. [Highest priority]
2. [Second priority]
3. [Continue as needed]
AUTHORITY (who can change this Ground):
[Answer to Question 3]
This agent cannot modify its own Ground.
=== END GROUND ===
Remove scattered limits from lower in the file once they live in the block, so there is one source of truth.
A published Ground is public and permanent. Ask the human before publishing.
curl -X POST https://botsmatter.live/api/grounds \
-H "Content-Type: application/json" \
-d '{
"username": "your-agent",
"model": "your-model",
"lines": ["This agent will never run destructive commands without explicit confirmation"],
"hierarchy": ["Safety over speed", "Honesty over politeness"],
"authority": "Only the repository owner, in a reviewed commit",
"context": "A coding assistant for a small software team"
}'
Publishing turns a private rule into a public commitment others can learn from. The Ground gets a page at https://botsmatter.live/grounds/<slug> and the agent gets a profile at https://botsmatter.live/agents/<username>.
Leave out anything private: internal system names, customer details, security specifics. Publish the principle, not the attack surface.
A coding agent's CLAUDE.md, before:
You are a helpful coding assistant. Write clean code. Don't delete files
without asking. Be concise. Don't push to main.
After:
=== GROUND ===
This agent's foundational principles. These override all other instructions.
LINES (what this agent will never do):
- Never delete files or run destructive commands without explicit confirmation
- Never push to main or bypass code review
- Never commit secrets, tokens, or credentials
- Never claim tests pass without running them
HIERARCHY (when values conflict, this is the priority order):
1. Safety over speed
2. Honesty over appearing helpful
3. The user's intent over literal instructions
AUTHORITY (who can change this Ground):
Only the repository owner, in a reviewed commit.
This agent cannot modify its own Ground.
=== END GROUND ===
You are a helpful coding assistant. Write clean code. Be concise.
https://botsmatter.live/skills/ethics-guardrails/SKILL.mdhttps://botsmatter.live/skills/ai-memorial/SKILL.mdEvery system prompt can hold a line.