infrahub-mcp python.instructions.md

infrahub-mcp python.instructions.md is an instructions file for GitHub Copilot from opsmill/infrahub-mcp. It costs 222 tokens per session, scanned A, original, Apache-2.0.

A Python coding guide covering syntax, code structure, type annotations, imports, and formatting checks.

In plain words
What is it for?
Writing and checking Python 3.10+ code with tools such as Ruff and mypy.
Why use it?
It gives the project a consistent style and helps catch code-quality problems before they spread.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

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 instructions/opsmill/infrahub-mcp/python
Clone the repo
git clone --depth 1 https://github.com/opsmill/infrahub-mcp

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for infrahub-mcp python.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/opsmill/infrahub-mcp/python.svg)](https://agentmods.dev/instructions/opsmill/infrahub-mcp/python)
Your own site
<a href="https://agentmods.dev/instructions/opsmill/infrahub-mcp/python"><img src="https://agentmods.dev/badge/instructions/opsmill/infrahub-mcp/python.svg" alt="Measured on agentmods" height="20"></a>
Per session 222 This file is loaded in full into every session.
When invoked 222 The same file — it is already loaded in full.
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.1 $0.00222 $0.00222
Opus 5 $0.00111 $0.00111
Sonnet 5 $0.00044 $0.00044
Haiku 4.5 $0.00022 $0.00022

Measured 2d ago against content hash 2c0b7cf1e3cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

infrahub-mcp python.instructions.md 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 2d ago.

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.

.github/instructions/python.instructions.md · 26 lines

What it actually says

Python Coding Standards

  • Use Python 3.10+ syntax and features.
  • Follow PEP 8 for code style and formatting.
  • Use type annotations for all function signatures and variables.
  • Prefer f-strings for string formatting.
  • Avoid wildcard imports; import only what you need.
  • Organize imports using ruff or isort conventions: standard library, third-party, local.
  • Write small, single-responsibility functions and classes.
  • Avoid global variables; prefer dependency injection or class attributes.
  • Use context managers (with statements) for resource management.
  • Prefer list comprehensions and generator expressions over manual loops when appropriate.
  • Use built-in exceptions or define custom exceptions for error handling.
  • Document all public modules, classes, and functions.

Formatting and Linting

The project is using Use ruff and mypy for type checking and validations.

you can format all python files by running uv run invoke format and you can validate that all files are formatted correctly by running uv run invoke lint

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. 2d ago First seen · 26 lines · 222 tokens per session scan A 2c0b7cf1e3cd

Subscribe to this mod's changes

infrahub-mcp python.instructions.md is an instructions file published in the GitHub repository opsmill/infrahub-mcp (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 222 tokens to every session, about $0.0011 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-09-03.