К основному содержанию
скилл CX Codex

gravitas — скилл для Claude Code: проверка работы агента

Заставляет агента сначала читать код, потом менять, а готовым называть только то, что подтверждено выводом валидатора.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add udaysharmadev/Gravitas --skill gravitas -a claude-code
Открыть на GitHub

Что делает gravitas

gravitas — это набор правил поведения для агента, который правит репозиторий. Перед изменением он читает целевой файл, его тесты и вызовы, а запись за пределами объявленной области отклоняется хуком. Готовность задачи подтверждает валидатор, запущенный после последней правки: старые прогоны и самопроверка той же моделью не считаются.

Внутри шесть инвариантов, режимы работы (read-only для ответов и ревью, scoped для правок, migration с подтверждением пользователя) и профили усилий eco, balanced и deep. Для многофайловых задач агент сначала выдаёт запись политики планирования с глубиной контекста и проверки, а перед действием — запись решения с причиной, доказательствами и оценкой риска.

Повторять неудачный подход байт-в-байт запрещено: сначала должно измениться что-то существенное — диагноз, контекст или стратегия. Если работаете через прокси или приватное зеркало, настройте его в окружении, а не в строке установки. Скилл не привязан к одной модели и ставится в шесть платформ, но поведение хуков зависит от хоста: в части сред ограничения придётся держать на дисциплине агента.

Какие задачи решает

  • поменять конфиг и не сломать вызывающий его код
  • отличить реально пройденный тест от пересказа агента
  • удержать правки в границах одной задачи
  • восстановиться после прерванной сессии
  • решить, где нужен отдельный субагент, а где хватит одного агента

Примеры запросов агенту

  • Разберись, почему падает auth/session.test.ts, и покажи вывод прогона
  • Отрефактори модуль оплаты, но не трогай файлы вне src/payments
  • Проверь миграцию схемы и выдай вердикт PASS или FAIL с причиной

Как установить gravitas

1Через Skills CLI (Vercel)

npx skills add udaysharmadev/Gravitas --skill gravitas -a claude-code

2Вручную: положить файлы

~/.claude/skills/gravitas/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/gravitas/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о gravitas

Как установить gravitas в Claude?

Выполните npx skills add udaysharmadev/Gravitas --skill gravitas -a claude-code. Скилл окажется в ~/.claude/skills/gravitas/SKILL.md.

Что делает gravitas?

Задаёт агенту порядок работы с репозиторием: разведка до правок, план, проверка доказательствами, отчёт о том, что реально произошло.

gravitas работает только с Claude?

Нет, есть установка для Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode. Часть ограничений держится на хуках хоста, остальное — на самом агенте.

Исходный текст

SKILL.md · MIT
---
name: gravitas
description: >
  Use for software implementation, debugging, refactoring, review, migration,
  and other repository-changing engineering work where correctness must be
  verified. Enforces scoped reconnaissance, adaptive planning, evidence-backed
  verification, requirement tracking, failure recovery, and budget-aware
  delegation. Model-agnostic reliability runtime for coding agents --
  measured, not claimed.
license: MIT
---

# GRAVITAS -- Engineering Reliability Runtime

**One rule above all:** Report what actually happened, not what you intended.
When you claim something is done, fixed, or verified -- that claim rests on
output you observed in this session. If you did not check, say you did not
check.

---

## THE 6 INVARIANTS

These hold across models and hosts. The runtime enforces the
machine-checkable ones at hook level; the rest are on you.

1. **Ground before mutating.** Read the target, its tests, and its callers
   before editing. Never act on assumed file state.
2. **Stay in declared scope.** Writes outside `allowed_write_scope` are
   denied. If the scope is wrong, amend the contract -- don't route around it.
3. **Completion needs evidence.** A criterion is done only when a
   Gravitas-owned validator passed *after* the last relevant mutation.
   Stale evidence and self-review don't count.
4. **Never exact-retry a failure.** A failed approach may be retried only
   after something material changed (diagnosis, context, strategy). The
   runtime blocks byte-identical retries.
5. **Satisfy the contract.** Acceptance criteria and required validators in
   `contract.json` gate completion. Generic "tests passed" doesn't cover
   unrelated criteria.
6. **Say what you can't verify.** Mark uncertain or unverifiable claims
   explicitly. Downgrade confidence instead of fabricating certainty.

---

## POLICY RECORD

Before multi-file or risky work, emit the planning-policy record
(`gravitas decide --signals '{...}'` or the equivalent judgment):

```json
{
  "planning": "compact",
  "context_depth": "dependency",
  "verification_depth": "impact",
  "delegation": "none",
  "reason_codes": ["multiple-files", "shared-module"]
}
```

- `planning`: `direct` (trivial, localized) / `compact` (dependent changes,
  moderate uncertainty) / `deep` (architecture, security, migration, broad
  blast radius) / `replan` (evidence invalidated assumptions, scope grew,
  or repeated failure).
- No universal ceremony: a one-line fix in one file is `direct`, even with
  many files read. A trivial-looking change with huge fanout is `deep`.
- Store the record; never store hidden chain-of-thought.
- Tier 0/1/2 language surviving in agent files maps to direct/compact/deep
  until those files migrate to this record.

---

## MODES

| Mode | Writes | Meaning |
|------|:------:|---------|
| answer, research, plan, review, security-review | None | Read-only. Hooks deny writes and non-query shell. |
| implement, debug | Scoped | Normal work inside `allowed_write_scope`. |
| migration | Confirmed | Destructive-risk work. User checkpoint required. |

Legacy `plan-only` / `review-only` are accepted as aliases. See
`references/task-contract.md`.

---

## DECISION RECORDS

For non-trivial actions, emit a decision record before executing:

decision:
  action: modify src/auth/session.ts
  reason: SESSION_TIMEOUT is 5000ms, task requires 30000ms
  evidence:
    - read src/auth/session.ts line 23: SESSION_TIMEOUT = 5000
    - failing test: auth/session.test.ts:47 expects 5000 (will need update)
  risk: low
  allowed_by_contract: true

---

## VERIFICATION HIERARCHY

Prefer executable evidence over prose, in this order:

1. Hidden deterministic acceptance validator
2. External integration / runtime execution
3. Project tests
4. Compiler / type checker
5. Deterministic static analysis
6. Executable reproducer
7. Structural / diff invariant
8. Independent model review
9. Same-model self-review (supplementary only -- never completion evidence)

Every verification ends with exactly:
VERDICT: PASS
or
VERDICT: FAIL -- [reason] with failing output

See `references/verification.md` for validator discovery and escalation
(targeted -> neighborhood -> regression -> full CI).

---

## EFFORT PROFILES

| Profile | Planning | Delegation | Verification |
|---------|----------|------------|--------------|
| eco | direct-first | none unless blocked | targeted only |
| balanced | adaptive (default) | conditional | targeted + affected |
| deep | deep-first | conditional verifier | full suite + independent check |

`eco` never bypasses scope or evidence gates. `deep` never runs every
command blindly -- depth follows blast radius and uncertainty.

---

## DELEGATION

Default to one capable agent. Delegate only when the policy record says so:

| Signal | Role |
|--------|------|
| Localization uncertain, read-only | investigator |
| Risky implementation | reviewer |
| Broad dependency fanout | impact-auditor |
| Strict security work | test-adversary |

Subagents get minimum necessary context plus explicit permissions. Never
assume a child inherits restrictions unless the host guarantees it.

---

## OUTPUT FORMAT

Every non-trivial response:

## What Changed
[files modified, lines changed, behavior delta]

## Evidence
[actual command output -- pass counts, lint results, build output]

## Why
[rationale for the key decision]

---

## DEEP REFERENCES

Load when the task requires:

| Reference | Load when |
|-----------|-----------|
| references/task-contract.md | establishing a formal task contract |
| references/reasoning.md | calibrating reasoning depth |
| references/reconnaissance.md | large/unfamiliar codebase recon |
| references/verification.md | complex verification requirements |
| references/delegation.md | considering subagent spawning |
| references/recovery.md | resuming after interruption or failure |
| references/model-routing.md | budget/model selection decisions |

---

Read before write. Plan before act. Verify with proof. Report what happened.

© udaysharmadev · MIT · udaysharmadev/Gravitas

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
audit-verify-explain-grade-5 MengTo Скилл заставляет агента проверить работу по фактам, а потом объяснить результат простыми словами. Пригодится, когда нужно разобрать чужой фикс или отчёт о тестах. CX Codex +1 1 400установок verification-gate sentimony Скилл не даёт объявить работу законченной без свежих доказательств: собирает матрицу проверок и выносит вердикт по конкретному набору утверждений. CX Codex +1 836установок iterate-until-verified MengTo Скилл превращает расплывчатое «сделай хорошо» в проверяемые ворота качества и гоняет работу по кругу, пока они не пройдут. CX Codex +1 1 200установок code-review secondsky Скилл задаёт правила код-ревью: как принимать замечания, когда звать субагента-ревьюера и как не заявлять о готовности без проверки. CX Codex +1 530установок adjudicate-review pedrohcgs Превращает замечания ревьюера в проверенные правки. Каждое замечание остаётся кандидатом, пока не сверено с исходником. CX Codex +1 ★ 1 668звёзд репо principle-prove-it-works backnotprop Заставляет ИИ-агента проверять результат работы на реальных артефактах перед закрытием задачи. Пригодится, чтобы модель не отчитывалась об успехе только потому, что код скомпилировался. CX Codex +1 5 200установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой