agentleFS
sd0xdevsd0xdev/sd0x-dev-flow/skills/risk-assess/SKILL.md

risk-assess

Skill192 starsChanged 42 days agoMITView on GitHub

Uncommitted code risk assessment with breaking change detection, blast radius analysis, and scope metrics. Use when: evaluating PR risk, pre-commit risk check, large refactoring review. Not for: security vulnerabilities (use /codex-security), code correctness (use /codex-review-fast). Output: 3-dimension weighted score + risk level + gate.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run bash scripts/run-skill.sh risk-assess risk-analyze.js --json to collect deterministic scores

    line 16
  2. Distinctive:

    Add qualitative interpretation beyond the scores (e.g., "high blast radius but all dependents are test files")

    line 22
  3. Distinctive:

    If the script fails, report the error and suggest running manually:

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Risk Assessment

When NOT to Use

  • Security vulnerability detection (use /codex-security)
  • Code correctness / lint / test review (use /codex-review-fast)
  • Project-level health audit (use /project-audit)

Procedure

  1. Run bash scripts/run-skill.sh risk-assess risk-analyze.js --json to collect deterministic scores
  2. Parse the JSON output — overall_score, risk_level, dimensions, flags, gate, next_actions
  3. If risk_level = Critical (score 75-100) — highlight all breaking signals, recommend splitting PRs
  4. If risk_level = High (score 50-74) — auto-escalate to --mode deep, detail blast radius
  5. If risk_level = Medium (score 30-49) — summarize dimensions, note areas of concern
  6. If risk_level = Low (score 0-29) — brief summary, confirm safe to proceed
  7. Add qualitative interpretation beyond the scores (e.g., "high blast radius but all dependents are test files")

Script Integration

The script analyzes 3 dimensions + 2 conditional flags:

DimensionWeightWhat It Measures
breaking_surface45%Removed exports, renamed APIs, changed signatures, deleted modules
blast_radius35%Number of files importing changed modules (grep-based)
change_scope20%File count, LOC delta, directory span, rename ratio
FlagTriggerWhat It Checks
migration_safetyMigration/schema files in diffRollback/down file exists
regression_hint(v2 stub)Future: git history analysis

Scoring Model

  • Overall: breaking_surface * 0.45 + blast_radius * 0.35 + change_scope * 0.20
  • Each dimension: 0-100 scale
  • Overall: 0-100 scale

Risk Levels

ScoreLevelGateExit Code
0-29LowPASS0
30-49MediumPASS0
50-74HighREVIEW1
75-100CriticalBLOCK2

Script Failure Fallback

If the script fails, report the error and suggest running manually:

bash scripts/run-skill.sh risk-assess risk-analyze.js --json

Output Format

## Risk Assessment Report

| Field | Value |
|-------|-------|
| Score | **[N]/100** |
| Risk Level | [icon] [level] |
| Gate | [PASS/REVIEW/BLOCK] |

### Dimensions
[table of dimension scores + weights]

### Breaking Change Signals
[list of detected signals — only if any]

### Next Actions
[prioritized action items]

## Gate: [sentinel]

References

  • references/risk-dimensions.md — Signal catalog, import patterns, scoring bands (read when investigating a specific dimension)
  • references/output-template.md — JSON schema, report templates per risk level (read when customizing output)

Verification

  • Script ran successfully
  • All 3 dimensions scored
  • Qualitative interpretation added beyond raw scores
  • Next actions are actionable (include commands where applicable)
  • Gate sentinel present in output

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.