Skills, Hooks and Permissions: write down the method, automate mechanics, reduce risk
- date
- category
- AI Agents
- also in
- AI Engineering · Automation · Engineering Practices
- reading
- 2 min / 368 words
After the previous levels, Claude knows the repository and can get the context it needs.
And yet similar instructions still appear in later sessions:
During review, check regressions, security and test coverage.
For failing CI, first find the job and reproduce the problem locally.
If you repeat an instruction regularly, it is no longer a good prompt.
It is a repeatable way of working.
Skill
A skill answers the question:
How should Claude perform a specific kind of task?
For example:
/review-pr
/investigate-ci-failure
/check-migration
/release-check
Instead of writing every time:
check correctness
check regressions
check security
check test coverage
you write it once as a skill.
Example:
# Review pull request
1. Read the requirements.
2. Inspect the complete diff.
3. Check correctness and regressions.
4. Check security implications.
5. Check test coverage.
6. Separate blockers from suggestions.
Do not modify code.
You keep a project-level skill in the repository:
.claude/
+-- skills/
+-- review-pr/
+-- SKILL.md
This way it is versioned together with the code.
Hooks and Permissions
Simple distinction:
Skill
= how Claude should work
Hook
= what should happen automatically
Permission
= what Claude can or cannot do
Example:
"during review, check security"
-> skill
"after editing a file, run formatter"
-> hook
"do not allow specific operations"
-> permission
Hooks and permissions are configured in:
.claude/settings.json
For example, a hook can look like this:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "npm run format"
}
]
}
]
}
}
So after editing a file, Claude Code automatically runs the formatter.
In short:
.claude/skills/
= way of working
.claude/settings.json
= automation and boundaries
Do not make Claude remember something that the system can do automatically.
And do not secure critical operations only with a prompt.
Example: failing CI
Skill:
# Investigate CI failure
1. Find the failing job.
2. Read the full failure.
3. Reproduce it locally if possible.
4. Find the root cause.
5. Apply the smallest reasonable fix.
6. Run verification.
7. Summarize the cause and change.
From now on, you do not describe the investigation methodology every time.
Claude has it written in the repository.
Implement this today
- Find one instruction you regularly repeat to Claude.
- Turn it into a skill in:
.claude/skills/<name>/SKILL.md
- Find one mechanical step, for example formatter or lint, and add it as a hook in:
.claude/settings.json
- Check whether operations the agent truly should not perform are constrained by permissions.
- Use this on a real task.
Level complete
The level is complete if:
- you have at least one reusable skill,
- at least one mechanical action no longer depends on Claude's memory,
- critical boundaries do not exist only as a prompt.
The most important upgrade:
Instead of constantly explaining to Claude how to work, you write the method once, automate mechanical steps and set technical boundaries.
At the next level we will handle the problem of one context trying to implement, test and review its own work at the same time.