Agent Skills
Skills are predefined task templates that guide the agent through specific compliance workflows.
Available Skills
| Skill | Description | Tools | Max Turns |
|---|---|---|---|
gap-analysis | Analyze system compliance gaps across frameworks | 10 | 20 |
narrative-generation | Generate implementation narratives for controls | 19 | 15 |
evidence-collection | Collect and map evidence from codebase to controls | 18 | 20 |
security-review | Review codebase for security controls and compliance posture | 21 | 25 |
stig-scan | Run STIG compliance scans against a system | 8 | 15 |
cci-assessment | Assess CCI compliance for a specific control | 9 | 15 |
The Tools column counts the Pretorin MCP tools listed in the skill’s
tool_names metadata. pretorin agent skills shows only Name, Description,
and Max Turns.
Each skill bundles a system prompt, an intended tool set, and a turn-budget
hint. Codex receives only the skill’s system prompt, as extra guidance. The
tool_names and turn-budget values document the intended workflow. They are
not sent to Codex and do not filter MCP tools or limit turns. Skilled and
unskilled runs see the same Pretorin MCP surface, and normal MCP tool
authorization and server-side guards apply to both.
--skill is validated against the registry before Codex starts: an
unknown name exits with code 1 and lists every registered skill, rather than
silently falling through to an unskilled run.
narrative-generation, evidence-collection, and security-review share one
set of workflow guardrails in their system prompts. Those guardrails require
the agent to evaluate an existing Issue against lifecycle precedence — to
recognize an active time-bounded acceptance before requiring a plan, and to
surface plan/action target dates and acceptance expiry/review dates — so all
three list the read-only lifecycle tools get_issue_plans, get_issue_plan,
get_issue_actions, and get_issue_acceptance_history alongside
get_control_issues. The guardrails also say to “close only through governed
verification”, and resolve_control_issue refuses is_resolved=true with the
same direction, so all three also list verify_issue, the governed closure
path. It takes the control_implementation_id returned by
get_control_issues. No skill lists the governed Plan write tools
(create_issue_plan/submit_issue_plan) or void_issue. Voiding is
terminal and irreversible, and deciding whether a finding was ever valid is a
human call.
Using Skills
# Gap analysis
pretorin agent run --skill gap-analysis "Analyze my system compliance gaps"
# Narrative generation
pretorin agent run --skill narrative-generation "Generate narratives for all AC controls"
# Evidence collection
pretorin agent run --skill evidence-collection "Collect evidence for AC-02 in this repo"
# Security review
pretorin agent run --skill security-review "Review this codebase for AC-02 coverage"
# STIG scan
pretorin agent run --skill stig-scan "Check STIG applicability for my system"
# CCI assessment
pretorin agent run --skill cci-assessment "Assess CCI compliance for AC-02"
List Skills
pretorin agent skills
Skill Details
Gap Analysis
Read-only platform analysis that identifies controls without complete implementation. The agent:
- Lists systems and their associated frameworks
- Checks the compliance status for each system
- Identifies controls that are not yet implemented or only partially implemented
- Prioritizes gaps by risk level (controls in higher-impact families first)
- Provides actionable recommendations for closing each gap
This skill does not write to the platform — it produces a structured report with sections for each framework. To capture findings as evidence or update narratives, follow up with evidence-collection or narrative-generation.
See Gap Analysis Workflow for the broader methodology that combines this skill with codebase search.
Tools: list_systems, get_system, get_compliance_status, list_frameworks, list_controls, get_control, get_control_implementation, get_control_context, get_scope, search_evidence
Narrative Generation
Generates control implementation narratives that meet auditor-readiness requirements:
- No section headers or standalone bold labels — start directly with the implementation overview because the SSP supplies headings
- Target 150–300 words, require at least 800 characters, and never exceed 400 words
- A short implementation overview plus a compact
Expectation | Implemented behavior | Evidencetable - Supported operating detail such as ownership, mechanism, cadence, verification, or retention; a few bullets alone are not sufficient
- No markdown images (until platform-side image evidence upload is available)
- No gaps, missing-information placeholders, or remediation backlog in narrative text
- Only documents observable facts (no hallucination)
- Maps supporting evidence to declared expectation keys before narrative composition
- Re-reads and reports covered/uncovered expectations plus unbound evidence
- Saves with AI review disabled unless the user explicitly requests review of the final generation
Under Codex, that last point is enforced by the MCP update_narrative tool:
trigger_review and review_requested_by_user both default to false, and the handler
refuses the review — without saving the narrative — if trigger_review=true arrives without
review_requested_by_user=true.
Evidence descriptions retain their separate, lighter profile: at least one rich markdown element, no section headers or standalone bold labels, and no gap lists, missing-information placeholders, unresolved caveats, or remediation backlog. Control issues (add_control_issue) are the durable home for gaps — don’t inline them in evidence or narratives.
The 800-character floor and 400-word ceiling are quality bounds, not writing targets to pad or fill. Agents should stay near the word-count range and use only supported detail. Built-in generation gets one automatic repair attempt when its draft is too short or lacks the implementation table; a second failure is returned as an explicit quality error instead of a weak narrative.
Narrative citations ground claims but do not satisfy expectation coverage.
Every artifact must be linked with an expectation_key or deliberately left
unconfirmed with unbound_reason. Recipe/source availability problems remain
preflight warnings. Treat ai_analysis as explanatory read-only output: the
platform reconciler owns AI finding Issues and exposes them through the issue
reads with ai_review_finding_key. Agents create Issues only for gaps
independently observed in the workspace or another connected source, so stale
or superseded review output cannot create duplicates.
Tools: list_systems, get_system, list_frameworks, get_control, get_control_implementation, get_control_context, get_scope, search_evidence, get_narrative, get_control_issues, get_issue_plans, get_issue_plan, get_issue_actions, get_issue_acceptance_history, link_evidence, update_narrative, add_control_issue, resolve_control_issue, verify_issue
Evidence Collection
Searches the codebase for evidence that maps to specific controls:
- Identifies relevant files and code patterns
- Creates evidence items with auditor-ready descriptions
- Links evidence to controls via the platform
- Binds each artifact to the expectation key it supports (or records an explicit unbound reason)
- Re-reads coverage and reports covered, uncovered, and unbound results
- Records gaps as issues when evidence is missing
Tools: list_systems, get_system, list_frameworks, get_control, get_control_context, get_scope, search_evidence, create_evidence, create_evidence_batch, link_evidence, get_control_issues, get_issue_plans, get_issue_plan, get_issue_actions, get_issue_acceptance_history, add_control_issue, resolve_control_issue, verify_issue
Security Review
Reviews the codebase against specific controls and records findings on the platform:
- Analyzes code for control coverage
- Identifies implementation strengths and weaknesses
- Documents findings with file paths and line numbers
- Pushes monitoring events for critical or high-severity findings
- Reopens control authoring with
in_progressand drafts narratives based on findings - Adds issues for findings that require manual remediation
- Produces remediation recommendations
This is the broadest write-side skill — it can call push_monitoring_event, update_control_status (only in_progress), update_narrative, create_evidence, link_evidence, and add_control_issue/resolve_control_issue in addition to the read-side platform tools. Issue closure runs through the governed verify_issue path once treatment completes; void_issue stays outside the skill.
Tools: list_systems, get_system, get_compliance_status, get_control, get_control_implementation, get_control_context, get_scope, push_monitoring_event, update_control_status, update_narrative, create_evidence, link_evidence, search_evidence, get_control_issues, get_issue_plans, get_issue_plan, get_issue_actions, get_issue_acceptance_history, add_control_issue, resolve_control_issue, verify_issue
STIG Scan
Runs STIG compliance scans against a system:
- Checks which STIGs apply to the system (applicability)
- Gets the test manifest (rules to evaluate)
- Reports available scanners and rule coverage
- Summarizes the scan plan and gaps in automated coverage
Tools: list_systems, get_system, get_compliance_status, list_stigs, get_stig, get_stig_applicability, get_test_manifest, get_cci_status
CCI Assessment
Assesses CCI-level compliance for a specific control:
- Gets control context and implementation status
- Lists CCIs for the target control
- Checks CCI-level test results (pass/fail/not tested)
- Identifies CCIs with no test coverage
- Presents results as a traceability chain: Control -> CCIs -> STIG rules -> test results
Tools: get_system, get_control, get_control_context, get_control_implementation, list_ccis, get_cci, get_cci_chain, get_cci_status, search_evidence