Skip to content
Skills Library
DevOps & cloud · Building & coding

formae-patch

/formae-patch

Use when the user needs to make an urgent targeted infrastructure change, hotfix, incident response fix, or patch without a full reconcile

Repository
formae-mcp ↗
Licence
Apache-2.0
Last repository change
08.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when the user needs to make an urgent targeted infrastructure change, hotfix, incident response fix, or patch without a full reconcile

Original author description

Use when the user needs to make an urgent targeted infrastructure change, hotfix, incident response fix, or patch without a full reconcile

How it works

  1. Targeting an environment (profile)
  2. How Patch Works
  3. Source context
  4. Workflow
  5. Post-Patch Reminder
  6. Important
Original SKILL.md headings · 60 lines, 755 words
SKILL.md preview
---
name: formae-patch
description: "Use when the user needs to make an urgent targeted infrastructure change, hotfix, incident response fix, or patch without a full reconcile"
---

# Patch Infrastructure (Patch Mode)

Use the `apply_forma` MCP tool in **patch** mode only for an explicit patch-mode request or stated incident/hotfix intent requiring a temporary intervention. For ordinary updates, including one label, hand off to `formae-apply` for a complete-stack soft reconcile. Do not infer an incident from a small change, the word "quick", a `.patch.pkl` filename or existing drift.

## Targeting an environment (`profile`)

`apply_forma` (and `get_command_status`) hit the formae agent's API directly and take an optional `profile` argument. If the user is working against a specific environment (e.g. `prod`, `staging`), pass that profile name as `profile` on the `apply_forma` call and any `get_command_status` follow-up so it targets that environment — for this session only, without changing global state. Patches are usually incident/hotfix work against one environment. If which environment they mean is unclear and `list_profiles` shows more than one, ask first. Never use `use_profile` to "set up" this session — the active profile is global and shared with the user's CLI and any other open sessions. When no profile is named, the active profile is used. Requires formae >= 0.87.0.

## How Patch Works

Patch only applies the changes explicitly specified in the forma file. Other resources are untouched. Use this for:
- Incident response (scaling up during traffic spikes)
- Urgent security fixes
- An explicit request to use patch mode and defer reconciliation

For ordinary configuration changes, prepare the complete affected stack and use reconcile without force. Never choose patch to avoid resolving drift or because only a partial file is currently available. Keep the selected source context on both preview and real submission. Explain the temporary nature of a patch in its confirmation. Do not immediately reconcile merely to make the patch permanent; this incident operation deliberately defers reconciliation. On the next requested reconcile, follow the saved drift preference.

## Source context

Reuse the selected `get_codebase_context` result. For `codebase`, keep the incident snippet inside the selected project and carry its binding context. For `none`, call `prepare_authoring` for the affected stack in a fresh `~/.formae-ai/scratch/<operation-id>/` directory, then author a separate minimal patch Pkl file inside it using its schema dependencies. Carry the returned `context` on apply. This workspace is temporary; never register it. Keep it until outcome/retry inspection is complete, then remove it.

## Workflow

In mode `none`, present the targeted infrastructure change and its actual
outcome. Temporary files, source diffs and cleanup stay internal; use the
launcher-selected formae executable from MCP initialization for local CLI work.

1. Help the user identify the resource(s) to modify
2. Create or locate a minimal forma file with only the targeted change
3. **Always simulate first**: call `apply_forma` with `mode: patch`, `simulate: true`
4. Show exactly what will change and suggest a factual optional `message`; the user can edit it or clear it with `message: ""` in the ordinary confirmation
5. **Ask for explicit confirmation**
6. If confirmed: call `apply_forma` with `mode: patch`, `simulate: false`
7. Poll `get_command_status` to monitor progress:
   - **Wait 5 seconds between polls** (`sleep 5`). Do NOT poll in a tight loop.
   - **Only report state transitions** — do NOT print anything unless a resource changed status since the last poll. Silently poll until something changes.
   - When reporting, summarize what changed rather than dumping the full JSON.
8. Report results

## Post-Patch Reminder

After a successful patch, always remind the user:

> This change was made through formae as a temporary patch. When reviewing this temporary intervention,
> reconcile it into the stack's desired state or revert it. With automatic acceptance enabled,
> the next requested reconcile keeps nonconflicting patch changes and shows them in its preview.

Follow `formae-fix-code-drift` for that later decision. A patch is not a change
made outside formae; use its recorded origin when explaining it.

Do not immediately reconcile or update maintained desired source merely to make this patch permanent. At the next requested soft reconcile, `auto_absorb` covers nonconflicting patches as well as external changes; only conflicts need a keep/revert decision. Default `prompt` and legacy `auto_absorb_external` still ask about patches. Follow `formae-fix-code-drift` for the combined preview and ordinary apply confirmation. Resolution controls apply only to soft reconcile, never patch.

## Important

- NEVER use `pkl eval` to evaluate forma files — ALWAYS use `formae eval --output-consumer machine`. Forma files use formae-specific extensions that only the formae CLI can resolve, and `--output-consumer machine` ensures parseable output instead of human-formatted text.
- NEVER skip the simulation step
- NEVER apply without user confirmation
- Patches are for explicit temporary interventions. For planned changes, use the `formae-apply` skill

Versions

The database has no other skills named formae-patch.

Database snapshot: 13.11.2026 · package version e6672be213f4 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100formae-apply
    Use when the user wants to deploy infrastructure, apply a forma file, reconcile a stack, update a stack, or make planned infrastructure changes
  • 100formae-config
    Use when the user wants to switch, list, save, edit, delete, or compare formae configuration profiles in ~/.config/formae/
  • 90emergencies
    Classify an urgent production change and guide its focused emergency review. Use when a user asks about an "emergency hotfix", "production incident", or "urgent security fix".
  • 100hotfix
    Ship an urgent production fix — minimal change, targeted tests, PR. Use when the user says "hotfix" or describes a bug that has to reach main now.
  • 95tl-hotfix
    Emergency hotfix to main: stash/cherry-pick changes, create hotfix branch from main, validate, open PR with auto-merge, restore source branch. Use when: critical production bug, urgent fix to main, hotfix, or the user says "/nacl:tl-hotfix".
  • 95nacl-tl-hotfix
    Emergency hotfix to main: stash/cherry-pick changes, create hotfix branch from main, validate, open PR with auto-merge, restore source branch. Use when: critical production bug, urgent fix to main, hotfix, or the user says "/nacl-tl-hotfix".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.