add-pattern

A guided workflow for adding a new automatic rule to GitWand, a tool that resolves Git merge conflicts. It covers the rule from its definition through registration and tests.

In plain words
What is it for?
Use it when GitWand must recognize and resolve a new kind of conflict, such as a specific change pattern or file situation.
Why use it?
It prevents new conflict rules from being added incompletely or with unclear behavior. The workflow collects the conditions, result, confidence, and data-risk decisions before code is changed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/devlint/gitwand/add-pattern
Any agent
npx skills add devlint/GitWand --skill add-pattern
Clone the repo
git clone --depth 1 https://github.com/devlint/GitWand

Made for: Claude Code, Codex.

Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.02236
Opus 5 $0.00030 $0.01118
Sonnet 5 $0.00012 $0.00447
Haiku 4.5 $0.00006 $0.00224

Measured yesterday against content hash 7155a8227bdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-pattern scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-pattern/SKILL.md · 282 lines

How it starts

The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: add-pattern

Guide the agent through every step needed to add a new conflict-resolution pattern from end to end, touching all four required locations in the right order.


Step 1 — Gather information before writing any code

Ask the following questions up front. Do not start editing files until you have clear answers.

  1. Name — What is the snake_case name for this pattern? (e.g. comment_only_change, empty_block_insertion)

  2. Trigger condition — In plain English, when does this pattern apply? Be precise: what must be true of oursLines, theirsLines, and optionally baseLines for the pattern to fire?

  3. Resolution strategy — What should the merged output look like when this pattern fires? (accept ours, accept theirs, union, base + additions, etc.)

  4. Confidence score — What typeClassification value (0–100) do you propose, and why? What dataRisk value (0–100, where 0 = safe)? Use the existing patterns as a reference:

    • same_change / one_side_change / delete_no_change → typeClassification 100, dataRisk 0
    • non_overlapping → typeClassification 90, dataRisk 20
    • whitespace_only / reorder_only / insertion_at_boundary → typeClassification 85–90, dataRisk 8–20
    • value_only_change → typeClassification 72–88, dataRisk 25
  5. Priority — What numeric priority should this pattern have? Lower = evaluated earlier. Current assignments:

    • 10 same_change, 20 delete_no_change, 30 one_side_change
    • 40 non_overlapping, 50 whitespace_only, 55 reorder_only
    • 57 insertion_at_boundary, 60 value_only_change, 999 complex Pick a value that places it at the right point in the evaluation chain.
  6. requires — Does the pattern need the base (diff3), work without it (diff2), or both? Use "diff3", "diff2", or "both".


Step 2 — Add the ConflictType to types.ts

packages/core/src/types.ts contains the ConflictType union. Add the new type name there before creating the pattern file — TypeScript will then flag every location that needs updating.

Read the full file on GitHub · 282 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 282 lines · 59 tokens per session scan A 7155a8227bdd

Subscribe to this mod's changes

add-pattern is a skill published in the GitHub repository devlint/GitWand (167 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 2,236 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

diffscope

코드 변경을 학습용 브리핑으로 바꾼다. 변경 지도 시각화 + 동작 차이 추적 + Python 문법 해설을 한 번에 터미널에 출력한다. Stop hook이 "[diffscope] 이번 턴에 소스 파일 N개가 변경되었다"라는 지시와 함께 patch 경로를 넘기면 반드시 이 스킬을 사용할 것. 사용자가 "방금 뭐 바뀐 거야", "이번 변경 설명해줘", "변경사항 설명", "이 코드 이해 안 돼", "브리핑", "다시 설명해줘", "더 자세히", "쉽게 다시", "문법만 다시", "로직만 다시", "아까 그 변경 다시 보여줘", "자동 분석 꺼줘/켜줘"라고 할 때도 이…

SWHee/diffscope · 292 tokens

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…

aiming-lab/AutoResearchClaw · 100 tokens

📝 任务完成后归档

重要提醒: 每次完成复杂调试或开发任务后,主动执行此流程! 将学到的经验归档为 skill,供以后参考。不要等用户提醒。.

Project-N-E-K-O/N.E.K.O · 49 tokens

deck-course-module

暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.

nexu-io/html-anything · 25 tokens

code-documenter

Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.

zebbern/claude-code-guide · 39 tokens