Skip to content
Agentmart
Submit a tool

github-md-template-fidelity

Enforces 100% template fidelity for GitHub markdown files (README.md, ARCHITECTURE.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, PRIVACY.md…

Skill by hmlendea

IndexedGPL-3.0
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hmlendea-github-md-template-fidelity

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Enforces 100% template fidelity for GitHub markdown files (README.md, ARCHITECTURE.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, PRIVACY.md, ROADMAP.md). Validates output against templates and rules before allowing completion.

Use cases: documents, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/github-md-template-fidelity

What's inside

Skill name
github-md-template-fidelity
Description
Enforces 100% template fidelity for GitHub markdown files (README.md, ARCHITECTURE.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, PRIVACY.md, ROADMAP.md). Validates output against templates and rules before allowing completion.
License
GPL-3.0
Instructions
227 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: missing

Files (3)

  • SKILL.md
  • validate_github_md.cpython-314.pyc · __pycache__/
  • validate_github_md.py

SKILL.md (first lines)

# GitHub MD Template Fidelity Skill

This skill enforces **100% template fidelity** for all GitHub markdown document generation. It must be invoked for any task that creates or revises these files.

## Invocation Protocol

When generating or revising any of these files, the agent MUST:
1. Read this skill file first
2. Read the corresponding template AND rules files
3. Execute the full validation pipeline before output

## Target Files & Required Pairs

| Target | Template | Rules | Fidelity |
|--------|----------|-------|----------|
| README.md | `prompts/instructions/github/github.readme.template.instructions.md` | `prompts/instructions/github/github.readme.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| ARCHITECTURE.md | `prompts/instructions/github/github.architecture.template.instructions.md` | `prompts/instructions/github/github.architecture.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| CONTRIBUTING.md | `prompts/instructions/github/github.contributing.template.instructions.md` | `prompts/instructions/github/github.contributing.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| CODE_OF_CONDUCT.md | `prompts/instructions/github/github.code-of-conduct.template.instructions.md` | `prompts/instructions/github/github.code-of-conduct.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| SECURITY.md | `prompts/instructions/github/github.security.template.instructions.md` | `prompts/instructions/github/github.security.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| PRIVACY.md | `prompts/instructions/github/github.privacy.template.instructions.md` | `prompts/instructions/github/github.privacy.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |
| ROADMAP.md | `prompts/instructions/github/github.roadmap.template.instructions.md` | `prompts/instructions/github/github.roadmap.rules.instructions.md` | `prompts/instructions/github/github.template-fidelity.instructions.md` |

## Validation Pipeline (MANDATORY - NO SHORTCUTS)

### Step 1: Template Acquisition
```bash
# Read ALL THREE files completely - no partial reads
read_file(template_path, 1, -1)
read_file(rules_path, 1, -1)
read_file(fidelity_path, 1, -1)  # prompts/instructions/github/github.template-fidelity.instructions.md
```

### Step 2: Evidence Collection
For each conditional block in template, verify evidence exists:
- File existence: `ls`, `test -f`, `glob`
- GitHub metadata: `gh api`, `gh release`, `gh workflow`
- Config parsing: `jq`, `dotnet`, `cargo`, `npm`, `pip`
- Directory structure: `find`, `tree`

### Step 3: Line-by-Line Template Processing
Process template from line 1 to EOF:
- **Fixed prose**: Copy EXACTLY (byte-for-byte including whitespace)
- **Placeholders**: Replace with evidence-based values
- **Conditionals**: Evaluate `<!-- Only if ... -->` and `<!-- Always include -->`
- **Repeatable**: Duplicate only when template comment says "Repeat"
- **Comments**: Strip ALL template comments from output

### Step 4: ToC Generation (Post-Content)
After ALL content finalized:
```markdown
## 📑 Table of Contents

- [Exact Heading Text](#exact-heading-anchor)
  - [Nested Heading](#nested-heading-anchor)
```
Rules:
- Include EVERY `##`, `###`, `####` in final output order
- Indent: 2 spaces per nesting level
- **ZERO emojis** in ToC text or anchors
- Valid markdown links to heading anchors

### Step 5: Final Validation (BLOCKING)
Run ALL checks - ANY failure requires full regeneration:

| Check | Pass Criteria |
|-------|---------------|
| Heading fidelity | Every heading matches template EXACTLY (emoji, case, punctuation, order) |
| Badge validity | Every badge has evidenced service/package/workflow/distribution/license |
| Mandatory sections | All "Always include" sections present |
| Conditional sections | Only included with evidence + substantive content |
| Additional sections | Only if genuinely material + no template section fits |
| **Fixed prose fidelity** | **Byte-for-byte match of all template prose outside placeholders/comments (per `github.template-fidelity.instructions.md`)** |
| Placeholder clearance | Zero `[[...]]`, `[[[...]]]`, template comments, unused examples |
| Empty content | No empty headings, tables, lists, code blocks |
| ToC completeness | Every final heading in ToC, correct order, 2-space indent, no emojis |
| Evidence alignment | Commands, paths, versions, links, defaults match repository |
| Release subsection | Exactly one `### Release` (or fixed .NET `release.sh` subsection) |
| Security | No secrets, credentials, personal data, private endpoints, unsafe scripts |

## Forbidden Patterns (Auto-Reject)
- ❌ Emojis in Table of Contents
- ❌ Missing template-defined headings
- ❌ Unresolved `<!-- [...] -->` conditional content
- ❌ Rephrased fixed template prose
- ❌ Placeholder text in output
- ❌ Empty sections/tables/code blocks
- ❌ Incorrect heading hierarchy
- ❌ Wrong emoji in headings
- ❌ Invented capabilities/packages/features

## Evidence Priority (Non-Negotiable)
1. Repository source, docs, manifests, configs, scripts, workflows, policy files
2. Git metadata, release tags, package metadata, configured remotes
3. Public registry metadata, hosted docs, deployment metadata
4. **ONE** concise user clarification if mandatory value indeterminate

## Failure Behavior
- If mandatory core value indeterminate after evidence collection → **STOP** and ask ONE clarification question
- If ANY validation check fails → **REGENERATE from Step 3**
- **NEVER** output partial or non-compliant document

## Integration with Agent Workflow
This skill is automatically invoked when:
- User requests creation/revision of any target GitHub MD file
- Agent detects GitHub MD file operation in progress
- Validation is requested explicitly

The skill provides the `validate_github_md` function for programmatic validation.

## Validation Script Usage
```bash
# Validate a generated file
python3 skills/github-md-template-fidelity/validate_github_md.py /path/to/repo README.md generated_readme.md

# Validate from stdin
cat generated_readme.md | python3 skills/github-md-template-fidelity/validate_github_md.py /path/to/repo README.md
```

From hmlendea/github-copilot-memories, GPL-3.0.

More from hmlendea/github-copilot-memories

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 21, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hmlendea

Cite this page

github-md-template-fidelity skill. Agent Mart. https://agentmart.dev/skills/hmlendea-github-md-template-fidelity (last updated 2026-10-24)