agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/dot-github/SKILL.md

dot-github

Skill4 starsChanged 6 months agoMITView on GitHub

Standardize `.github` directory structure, enforce agentic documentation patterns. You MUST load this skill when creating or updating files in `.github/` dir.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 2 are distinctive, and 10 are 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.

  • 10

    Very specific

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

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

    When establishing or organizing the structure of the .github/ directory for a new repository.

    line 16
  2. Distinctive:

    When you need to safely disable a workflow by moving it instead of deleting it.

    line 18
  3. Very specific:

    When configuring actual CI/CD pipeline logic inside the YAML files (use github-actions or gh-aw-syntax).

    line 23
  4. Very specific:

    If you are managing organization-wide .github repository templates and don't want to override them locally.

    line 24
  5. Very specific:

    Never guess or invent teams in CODEOWNERS when they are unknown.

    line 39
  6. Very specific:

    Use .github/AGENTS.md to describe the structure of the .github directory and its contents (agents, instructions, prompts, skills).

    line 41
  7. Very specific:

    Use .github/workflows/AGENTS.md to list workflows that can be triggered manually (crucial when the agent has actions write permissions).

    line 42
  8. Very specific:

    Document available prompts in .github/prompts/AGENTS.md and specify when to load them.

    line 43
  9. Very specific:

    Document instruction scopes in .github/instructions/AGENTS.md.

    line 44
  10. Very specific:

    If an org/owner-level .github repository exists, follow its upstream guides instead of creating local duplicates (e.g., CONTRIBUTING.md, …

    line 46
  11. Very specific:

    Document the list of available workflows in .github/workflows/README.md.

    line 49
  12. Distinctive:

    Always be careful and double-check your changes to ensure the continuity of your own runtime workflow.

    line 90

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

Skill: dot-github

<!-- markdownlint-disable MD013 MD023 MD031 MD032 MD033 -->

Standardize .github directory structure, enforce agentic documentation patterns.

When to Use

  • When establishing or organizing the structure of the .github/ directory for a new repository.
  • To create or update AGENTS.md documentation specifically for the workflows folder.
  • When you need to safely disable a workflow by moving it instead of deleting it.

When Not to Use

  • For creating generic documentation outside of the .github/ folder (use docs-writer instead).
  • When configuring actual CI/CD pipeline logic inside the YAML files (use github-actions or gh-aw-syntax).
  • If you are managing organization-wide .github repository templates and don't want to override them locally.

Common Pitfalls

  • Creating .github/README.md: Generating a README inside the .github/ directory, which GitHub prioritizes and uses to completely overwrite the repository's main homepage.
  • Inventing CODEOWNERS: Guessing usernames or teams in the CODEOWNERS file instead of verifying their existence, rendering the file invalid and breaking PR approvals.
  • Destructive Deletion: Deleting a workflow file completely instead of moving it to .github/workflows-disabled/, losing its history and configuration.

Core Principles

  • Configuration Validation: Validate .github/mcp-config.json if the file exists.
  • Disabling Workflows: To temporarily disable workflows, consider moving them to .github/workflows-disabled/.
  • Do Not Invent CODEOWNERS: Never guess or invent teams in CODEOWNERS when they are unknown. Only use verified, existing teams.
  • Agentic Instructions (AGENTS.md):
    • Use .github/AGENTS.md to describe the structure of the .github directory and its contents (agents, instructions, prompts, skills).
    • Use .github/workflows/AGENTS.md to list workflows that can be triggered manually (crucial when the agent has actions write permissions).
    • Document available prompts in .github/prompts/AGENTS.md and specify when to load them.
    • Document instruction scopes in .github/instructions/AGENTS.md.
  • Upstream Organization Fallbacks: If an org/owner-level .github repository exists, follow its upstream guides instead of creating local duplicates (e.g., CONTRIBUTING.md, ISSUE_TEMPLATE/).
  • Workflow Documentation: Document the list of available workflows in .github/workflows/README.md.

Firewall

To document encountered restrictive firewall during runtime, this can be documented in .github/FIREWALL.md, e.g.

# Firewall Allowlist

If your agent runs behind a restrictive firewall, allow these hosts.
Always check the official guidance for updates.

```plaintext
agents.md
aka.ms
gh.io
ghcr.io
github.com
img.shields.io
pkg-containers.githubusercontent.com
raw.githubusercontent.com
support.github.com
tldrlegal.com
uploads.github.com
user-images.githubusercontent.com
yaml-multiline.info
web.archive.org
```

Note: Keep the list sorted alphabetically for easier maintenance.

Reference: <https://gh.io/copilot/firewall-config>

Hardened NEVER List

  • NEVER create .github/README.md: GitHub renders .github/README.md with the highest priority. Creating it will override the main README.md on the repository homepage and profile page.
  • Do not break your own workflow: Refactoring, such as removing required triggers, can prevent the workflow from being triggered again. Always be careful and double-check your changes to ensure the continuity of your own runtime workflow.

What to Avoid

  • Creating undocumented workflows in .github/workflows/.
  • Deleting workflows instead of moving them to .github/workflows-disabled/.
  • Overwriting upstream organization defaults in .github/ repo.

Related Skills

  • agents-md-writer: You MUST load this skill when creating or updating AGENTS.md files.
  • docs-writer: You MUST load this skill when asked to write, document, or generate new documentation.

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.