skillsaw plugin: lint operational runbooks as agent content
Project description
skillsaw-runbooks
A skillsaw plugin that lints operational runbooks as agent content. Runbooks are step-by-step procedures executed under pressure — increasingly by AI agents as well as on-call engineers — so they deserve the same lint coverage as any other instruction file.
This plugin also serves as a complete, published example of every skillsaw plugin extension point: rules, a custom repository type with content paths, a lint tree contributor, and a plugin CLI.
What it does
When a repository has markdown files under runbooks/, the plugin:
- detects the
runbookrepository type, which activates the rules below and pullsrunbooks/**/*.mdinto skillsaw's content linting (so every builtincontent-*rule covers your runbooks too); - attaches
runbooks/catalog.json(if present) to the lint tree so the catalog rule can check it.
Rules
| Rule | Default severity | Checks |
|---|---|---|
runbook-required-sections |
warning | Every runbook has the required headings (default: Steps, Rollback) |
runbook-frontmatter |
warning | Every runbook has YAML frontmatter with the required fields (default: title, owner) |
runbook-catalog |
warning | runbooks/catalog.json, when present, lists every runbook and only runbooks that exist |
A passing runbook:
---
title: Database failover to the replica
owner: storage-team
---
# Database failover
## Steps
1. Freeze writes ...
## Rollback
Repeat with the old primary as the candidate ...
A failing one — no owner, no Rollback section:
---
title: Flush the Redis cache
---
# Cache flush
## Steps
1. redis-cli --scan --pattern 'rates:*' | xargs redis-cli del
$ skillsaw lint
⚠ WARNING (runbook-required-sections) [runbooks/cache-flush.md]: Runbook is missing a 'Rollback' section
⚠ WARNING (runbook-frontmatter) [runbooks/cache-flush.md]: Runbook frontmatter is missing 'owner'
Catalog
Optionally keep an index of your runbooks in runbooks/catalog.json:
{
"runbooks": [
"db-failover.md",
"cache-flush.md"
]
}
Paths are relative to runbooks/. The runbook-catalog rule warns when a
runbook on disk is missing from the catalog or a catalog entry has no
file. Without a catalog file the rule stays quiet — it is opt-in by
presence.
Install
$ pip install skillsaw-runbooks
$ skillsaw lint
That's it — skillsaw discovers the plugin automatically. Requires a skillsaw new enough to support plugins (>= 0.15).
CLI
The plugin ships a small companion CLI, dispatched through skillsaw:
$ skillsaw runbooks list
runbooks/db-failover.md: Database failover to the replica — storage-team
runbooks/cache-flush.md: Flush the Redis cache — (no owner)
$ skillsaw runbooks rules
runbook-required-sections — Runbooks must contain the required sections (default: Steps, Rollback)
...
Configuration
Configure rules by ID in .skillsaw.yaml, like any builtin rule:
rules:
runbook-required-sections:
severity: error
sections: ["Steps", "Rollback", "Verification"]
runbook-frontmatter:
fields: ["title", "owner", "last-reviewed"]
Disable a single rule, the whole plugin, or all plugins:
rules:
runbook-catalog:
enabled: false
plugins:
disable: [runbooks]
$ skillsaw lint --no-plugins
Development
$ python -m venv .venv
$ .venv/bin/pip install -e '.[dev]'
$ .venv/bin/pytest
To develop against an unreleased skillsaw, install it first:
.venv/bin/pip install -e ../skillsaw.
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skillsaw_runbooks-0.1.0.tar.gz.
File metadata
- Download URL: skillsaw_runbooks-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c427057b11060dcadd5b0b63fbec1defb20e1b2e9e32cceb307736ba48caac69
|
|
| MD5 |
3f1ecd21ec92a4ce37eb7541e3accc79
|
|
| BLAKE2b-256 |
08ebb7b9ab004e2f6c68268e1ca34f20a507c0d791396e6609d8cb4cfa99d8df
|
Provenance
The following attestation bundles were made for skillsaw_runbooks-0.1.0.tar.gz:
Publisher:
release.yml on stbenjam/skillsaw-runbooks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skillsaw_runbooks-0.1.0.tar.gz -
Subject digest:
c427057b11060dcadd5b0b63fbec1defb20e1b2e9e32cceb307736ba48caac69 - Sigstore transparency entry: 2050238386
- Sigstore integration time:
-
Permalink:
stbenjam/skillsaw-runbooks@831e750c8d1b3da45cf76b3142302ac3714f754c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/stbenjam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@831e750c8d1b3da45cf76b3142302ac3714f754c -
Trigger Event:
release
-
Statement type:
File details
Details for the file skillsaw_runbooks-0.1.0-py3-none-any.whl.
File metadata
- Download URL: skillsaw_runbooks-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22be829cadd33329489fb469cc55eb98a76df1c5dbd466fe6ed9b88058d64295
|
|
| MD5 |
da16d67ff77c7e78d1c55d560cae315f
|
|
| BLAKE2b-256 |
06e3b677923bccf883d97043df669003ea1d26cc94e67e0b44949ddb39bccc0b
|
Provenance
The following attestation bundles were made for skillsaw_runbooks-0.1.0-py3-none-any.whl:
Publisher:
release.yml on stbenjam/skillsaw-runbooks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skillsaw_runbooks-0.1.0-py3-none-any.whl -
Subject digest:
22be829cadd33329489fb469cc55eb98a76df1c5dbd466fe6ed9b88058d64295 - Sigstore transparency entry: 2050238917
- Sigstore integration time:
-
Permalink:
stbenjam/skillsaw-runbooks@831e750c8d1b3da45cf76b3142302ac3714f754c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/stbenjam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@831e750c8d1b3da45cf76b3142302ac3714f754c -
Trigger Event:
release
-
Statement type: