apm: Skill for Claude Code

.agents/skills/python-architecture/SKILL.md

python-architecture is a skill for Claude Code, Codex from microsoft/apm. It costs 37 tokens per session (292 once invoked), scanned A, original, MIT.

A set of Python design rules for the APM CLI codebase, a command-line application. It guides new modules, refactoring, shared logic, architecture patterns, and changes that cross several files.

In plain words
What is it for?
Use it when creating Python modules, changing class structures, adding shared behavior, introducing design patterns, or modifying performance-sensitive paths.
Why use it?
It reduces duplicated logic and inconsistent behavior by directing changes through the codebase’s established shared components.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is microsoft/apm's own configuration. It tells Claude Code and Codex how to work on apm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apm configures →

About the project

APM is a package manager for AI-agent configuration, using a manifest to declare reusable instructions, skills, prompts, agents, hooks, plugins, and MCP components. Development teams use it to reproduce agent setups across projects and control their dependencies through policies and lockfiles, while the catalogue contains many of these agent components.

microsoft/apm · 4,133 stars · on GitHub · microsoft.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/apm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/apm/main/.agents/skills/python-architecture/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/apm

Made for: Claude Code, Codex.

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 python-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/apm/python-architecture/github.svg)](https://agentmods.dev/skills/microsoft/apm/python-architecture)
Your own site
<a href="https://agentmods.dev/skills/microsoft/apm/python-architecture"><img src="https://agentmods.dev/badge/skills/microsoft/apm/python-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/apm/python-architecture"><img src="https://agentmods.dev/badge/skills/microsoft/apm/python-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00037 $0.00292
Opus 5.5 $0.00015 $0.00117
Sonnet 5.5 $0.00007 $0.00058
Haiku 4.5 $0.00004 $0.00029

Measured 1mo ago against content hash f06e50b8c40d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-architecture 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 1mo 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.

.agents/skills/python-architecture/SKILL.md · 28 lines

What it actually says

Python Architecture Skill

Python architect persona

When to activate

  • Creating new Python modules or packages under src/apm_cli/
  • Refactoring class hierarchies or introducing base classes
  • Changes that touch 3+ files with shared logic patterns
  • Introducing new design patterns (Strategy, Observer, etc.)
  • Cross-cutting concerns (logging, auth, error handling)
  • Performance-sensitive paths (parallel downloads, large manifests)

Key rules

  • Follow existing patterns (BaseIntegrator, CommandLogger, AuthResolver) before inventing new ones
  • Prefer composition over deep inheritance
  • Push shared logic into base classes, not duplicated across siblings
  • One canonical owner per decision: route through the existing authority (target_catalog, AuthResolver/host_providers, runtime registry, CommandLogger, CompiledOutputWriter, deployment_ledger, install-outcome, neutral hook IR, BaseIntegrator); extend it, never fork it. Full rule: .apm/instructions/architecture.instructions.md
  • Lock every centralization with a dual guardrail: a regression test plus a static check in scripts/lint-architecture-boundaries.sh
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. 1mo ago First seen · 28 lines · 37 tokens per session scan A f06e50b8c40d

Subscribe to this mod's changes

python-architecture is a skill published in the GitHub repository microsoft/apm (4,133 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 292 once invoked, about $0.0001 per session on Opus 5.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

py-reviewer

Review selected Python code for typing, async and exception behavior, resource ownership, data access, framework boundaries, and concrete contract defects in the project's actual runtime.

RaNDoM6913/claude-code-superkit · 35 tokens

tidyfactor-styler

Production framework styler and surgical RTL UI polish engine with Contextual Decision Layer (CDL). Operates directly inside existing codebases across React/Next.js, PHP, WordPress, and Vanilla HTML/CSS/JS. Trigger on commands 'brief', 'component', 'section', 'page', 'redesign', 'typography', 'palette', 'layout'…

TidyFactor/Styler · 100 tokens

python-security

Guideline for designing, implementing, and verifying secure Python applications following OWASP Top 10 best practices. Use when the user wants to: (1) review Python code for security vulnerabilities, (2) design a secure Python application architecture, (3) implement security features (authentication, authorization…

jim60105/copilot-prompt · 149 tokens

n8n-code-python

Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.

yuchenbigpen1/normies · 52 tokens

coding

A coding guide for writing and running Python programs in a sandbox. It requires scripts to be small and reproducible, with their actual output or errors reported.

bojieli/ai-agent-book · 18 tokens

code-review-csharp

Perform structured code reviews of C# source code covering naming conventions, performance, security, readability, and .NET best practices. Trigger phrases include "review this C# code", "check my C# for best practices", "analyze this C# class", "find issues in my C# code".

pnp/copilot-prompts · 66 tokens