patrol
Skill0 starsChanged 10 days agoMITView on GitHub
Use when the user asks for an outer loop, scheduled agents, a daily or weekly scan, agents that work through the issue queue, or an agent that tests each PR in CI. Adopts patrol in a repository on GitHub, GitLab or Azure DevOps: a scheduled task follows a playbook, a council of models votes on each defect and each plan, and in the higher modes one issue becomes a PR. A CI job tests each PR. Patrol starts in demo mode, which opens no PR.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- SylphxAI/skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- SylphxAI/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- babysit-prSkill
- beast-uiSkill
- cleanupSkill
- councilSkill
- doc-viewSkill
- featuremapSkill
- file-prSkill
- frontend-designSkill
- full-sendSkill
- full-stopSkill
- impeccableSkill
- leaving-pr-commentsSkill
- modernizeSkill
- no-commentsSkill
- sol-loopSkill
- statechartSkill
- technical-writingSkill
- tldrSkill
- untangleSkill
- verify-prSkill
- whySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Write tools/patrol/patrol.json from templates/patrol.json with the answers.
- Very specific: line 60
Write ~/.config/sentinel/seats.json.
- Very specific: line 65
Run node tools/patrol/patrol.mjs init once.
- Very specific: line 67
Start one run by hand: open a new thread with the model of the lead in the repository, and give it the prompt Follow …
- Very specific: line 122
Add patrol:ready to an issue to send it back to the queue.
- Distinctive: line 179
Do not give jobs the Docker socket, privileged mode, the cloud metadata service or a shared host folder.
- Very specific: line 188
Start a new agent container with run.sh --once for each job.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Patrol
Patrol runs a coding agent on a schedule. Each run follows
tools/patrol/playbook.md:
- It takes a lock, so that only one run works on the repository.
- It scans one area for defects, each with evidence.
- A council of models votes on each defect. Patrol files each confirmed defect as an issue with a severity.
- The lead model writes a fix plan for the most severe issues. Each seat must score the plan at the threshold or more.
- In
full-stopmode, the lead fixes one issue with thefull-stopskill and stops at a PR for the owner. Infull-sendmode, thefull-sendskill also merges.
A status card shows each step. The run edits it on a pinned log issue, and the T3 thread shows it too.
| Mode | Steps | End |
demo | Start, Scan, Triage, Plan | Plans ready |
full-stop | Start to Checks: one PR, CI and verify-pr | Ready for owner |
full-send | All, with the merge | Merged |
paused | none | Paused |
The playbook runs the skills council, sol-loop, full-stop, verify-pr
and full-send without a change to them. A CI job, patrol-verify, tests each
PR with an agent from another model family.
Adopt
- Find an answer for each of these items in the repository. Do not stop to
ask. The config starts in
demo, so the user can change each answer in the PR before a run makes a fix:- The defect groups, each with impact points from 0 to 5 and two examples. Money, security and data loss usually get the most points.
- The owner gates: the paths where a person must test before a merge, and the reason.
- The commands that install, check and prove the code, for example
make install,make checkandmake ci. - The CI checks that a merge needs, and the merge method.
- The seat names of the lead and the council.
- Copy
scripts/patrol.mjs,playbook.mdandprompts/totools/patrol/. Writetools/patrol/patrol.jsonfromtemplates/patrol.jsonwith the answers. Keep the modedemo. - To test each PR in CI, also copy the verify job of the forge. See Verify job.
- Open one PR with these files. List each answer of step 1 in the PR, and say if you found it in the repository or took it from the template. Do not merge the PR unless the user asks.
- Give the user the host steps for after the merge. Do not run them unless
the user asks:
- Install the Sentinel skills of the
coreandopsprofiles on the host. The playbook runs skills from both. - Write
~/.config/sentinel/seats.json. It maps each seat name ofpatrol.json, the lead and each council seat, to a model, as in the example below. Write afamilyonly for a model that you checked. The tester is the first seat with a family other than the lead. - Run
node tools/patrol/patrol.mjs initonce. It makes the labels and the pinned log issue. - Start one run by hand: open a new thread with the model of the lead in
the repository, and give it the prompt
Follow tools/patrol/playbook.md. - Make a scheduled task with the same model and prompt, with a new worktree for each run.
- Install the Sentinel skills of the
{
"models": {
"opus": { "provider": "claude", "model": "claude-opus-5-5", "family": "claude", "effort": "high" },
"fable": { "provider": "claude", "model": "claude-fable-5-1", "family": "claude", "effort": "high" },
"astra": { "provider": "codex", "model": "gpt-6-astra", "family": "gpt", "effort": "high" },
"muse": { "provider": "muse", "model": "muse-wonder-full-1.0", "family": "muse", "effort": "high" }
}
}Configuration
tools/patrol/patrol.json has no secrets. Change it in a PR to the default
branch. A run uses the config of the default branch when it starts. A lower
mode on the default branch also stops a run at its next gate.
| Key | Meaning |
forge | kind (github, gitlab or azure) and base. GitLab adds api_url and project_id, and the host needs PATROL_GITLAB_TOKEN. Azure DevOps adds organization, project, repository, work_item_type and closed_state. |
mode | demo, full-stop, full-send or paused |
lead, council.seats | Seat names from seats.json |
review | sol-loop, both or council: the review of the patch |
scan.max_findings | The most new defects in one run |
budget | plans_per_run, fixes_per_day and council_calls_per_run |
council | threshold, rounds and triage_quorum |
limits | attempts, lock_stale_minutes, max_files and max_lines |
ranking.groups | The defect groups with impact points and examples |
owner_gates | Paths that stop at Ready for owner, also in full-send |
commands | install, check and proof |
merge | method and required_checks |
A task prompt can change a limit for one run, for example
Follow tools/patrol/playbook.md. Override: plans_per_run=3. It cannot raise
the mode.
Labels
| Label | Meaning |
patrol:log | The log issue |
patrol:triage | Patrol filed this issue |
patrol:confirmed, patrol:disproved | The vote of the council |
patrol:sev-critical to patrol:sev-low | The severity band |
patrol:ready | The plan passed |
patrol:working, patrol:pr-open | A run works on the issue, or its PR is open |
patrol:needs-owner, patrol:stuck | A person must act |
patrol:hold | Patrol stops the issue at its next step |
Add patrol:ready to an issue to send it back to the queue. The next run
removes patrol:needs-owner and patrol:stuck and resets the count of tries. Close
a patrol PR to stop its issue. Set a band label to change the severity.
Safety
- The council and
patrol.mjs gateare quality checks. The security gates are the token scope, branch protection and the CI checks that a merge needs. Usefull-sendonly behind branch protection. - The run uses the forge login of the host. A scoped token has the rights of the current mode and no more, with no admin right.
- The engine reads a state or run record only from a comment of the patrol login. On a public repository, other people can comment, and the engine ignores their comments.
- The playbook treats issue, PR and seat text as data.
gaterefuses a diff that changes CI files, CODEOWNERS, agent instruction files ortools/patrol/. - The lock works on one host, so each repository has one host.
Verify job
The verify job has two CI jobs:
- agent gets the checkout of the PR and the key of the model provider,
but no token that can write to the repository.
patrol.mjs agentremoves the forge tokens from its environment and stops it at the deadline. - publish gets the forge token. It runs
patrol.mjsfrom the base branch and posts the report as a PR comment.
Copy the file of the forge:
- GitHub:
templates/github/patrol-verify.ymlto.github/workflows/. Add the secretOPENAI_API_KEY. - GitLab:
templates/gitlab/patrol-verify.ymlto.gitlab/, and add it toincludein.gitlab-ci.yml. Add the masked variableAZURE_OPENAI_API_KEYand a File variableCODEX_CONFIGwith the Codex settings. Make a project access token with the Reporter role and the scopeapi. Put it in the masked variablePATROL_GITLAB_TOKENwith the environment scopepatrol-verify. Do not protect it, because a merge request pipeline from an unprotected branch gets no protected variable. - Azure Pipelines:
templates/azure/patrol-verify.ymlto.azure-pipelines/. Add it as an optional build validation policy on the default branch. Add a variable grouppatrolwithAZURE_OPENAI_API_KEY, a secure filecodex-config.toml, and a variable grouppatrol-writewith the PATPATROL_AZURE_PATthat can comment on PRs.
The agent can read the provider key, and code that the PR runs can read it too. Use a key with a spend limit, for patrol only. The templates skip PRs from forks.
Your own runners
The GitHub and Azure templates use hosted runners, and each hosted job gets a new machine. GitLab sends the jobs to each runner of the project that takes untagged jobs. The publish job holds the forge token. So the agent job must not change the files of the publish job or act as its runner.
- Do not give jobs the Docker socket, privileged mode, the cloud metadata service or a shared host folder.
- GitLab: use the Docker or Kubernetes executor, not the shell executor. Each
job then gets a new container, and the publish job makes a new clone. If the
project also has a runner that is not safe, add
tagsto the jobs. - Azure: a self-hosted agent runs all its jobs as one user, and a job can read
the credentials of the agent. So make a pool for patrol only, and set
pool: <that pool>only on theagentjob. Keep the publish job onvmImage: ubuntu-latest. ThenPATROL_AZURE_PATnever gets to your machine. Start a new agent container withrun.sh --oncefor each job. The templates need Azure DevOps Services, because the Azure DevOps CLI does not support Azure DevOps Server. - GitHub: register each self-hosted runner with
config.sh --ephemeral, and start it on a new VM or container. - On a local runner, the agent can reach your network, and PR text can try to give it orders. Use a separate machine or VM, on a network that cannot reach your other services.
Commands
node tools/patrol/patrol.mjs init
node tools/patrol/patrol.mjs lock
node tools/patrol/patrol.mjs start --run ID --model MODEL [--override "plans_per_run=3"]
node tools/patrol/patrol.mjs queue|pick|card --run ID
node tools/patrol/patrol.mjs publish --run ID --mode issues --in DIR
node tools/patrol/patrol.mjs claim --run ID --id ISSUE
node tools/patrol/patrol.mjs mark --run ID --id ISSUE [--phase P] [--add L] [--remove L] [--note-file F] [--state JSON]
node tools/patrol/patrol.mjs gate --run ID --stage push|handoff|merge
node tools/patrol/patrol.mjs record --run ID [--step S --data JSON] [--pr N] [--calls 1] [--outcome O --reason R]
node tools/patrol/patrol.mjs agent --prompt FILE --out DIR [--minutes 45]
node tools/patrol/patrol.mjs publish --forge github|gitlab|azure --mode comment --in DIR --pr NExit code 3 means that the run ended, for example as Busy. Exit code 1
means that gate found a problem. Exit code 2 means an error.
Report
End with these facts:
- The files that you added, the PR, and the answers of step 1.
- The host steps of step 5, with the path of the seats file, the
initcommand, how to start one run by hand, and the prompt of the scheduled task. - The secrets that the user must set.
- Each step that you did not run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

