ak-dev-code-quality

A set of standards for formatting code, sorting Python imports, writing commit messages, and preparing pull requests in the Agent Kernel project. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Running project lint checks, formatting source code and examples, and using a GitHub workflow to format a remote branch and commit the result.
Why use it?
It keeps contributions consistent and lets developers check or automatically fix common formatting issues before review.

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/yaalalabs/agent-kernel/ak-dev-code-quality
Any agent
npx skills add yaalalabs/agent-kernel --skill ak-dev-code-quality
Clone the repo
git clone --depth 1 https://github.com/yaalalabs/agent-kernel

Made for: Claude Code, Codex.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,705 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.00041 $0.01705
Opus 5 $0.00020 $0.00852
Sonnet 5 $0.00008 $0.00341
Haiku 4.5 $0.00004 $0.00170

Measured 2d ago against content hash 5967e3b92b29, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ak-dev-code-quality 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.

.agents/skills/ak-dev-code-quality/SKILL.md · 253 lines

How it starts

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

Code Quality & Contribution Conventions

Code Formatting

Agent Kernel uses black for formatting and isort for import sorting.

Auto-format

# Format ak-py source and tests
make lint

# Format examples too
make lint-all

Check only (CI mode, no changes)

make lint-check       # ak-py only
make lint-check-all   # ak-py + examples

Auto-format a remote branch (CI)

To apply formatting on a remote branch without running the tools locally, trigger the Lint and Commit GitHub Actions workflow (.github/workflows/lint-fix.yml) manually from the Actions tab (workflow_dispatch). It takes two inputs:

  • lint_target: which Makefile target to run — lint, lint-examples, or lint-all (default).
  • branch: the branch to format and commit the changes to.

The workflow runs the selected target and pushes a chore: commit with any formatting changes back to the chosen branch. Protected branches (currently develop) are rejected before any changes are made.

Configuration

In ak-py/pyproject.toml:

[tool.black]
line-length = 150
target-version = ["py312"]

[tool.isort]
profile = "black"
line_length = 150

In example projects, line length is 120:

[tool.black]
line-length = 120
target-version = ["py312"]

Type Checking

cd ak-py
uv run mypy src/

Configuration:

[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true

Commit Convention

Use Conventional Commits format:

<type>: <short description>

Types

Type When to Use
feat: New feature or capability
fix: Bug fix
docs: Documentation changes only
chore: Maintenance, dependencies, config
refactor: Code restructuring without behavior change
test: Adding or modifying tests

Examples

feat: add telegram messaging integration
fix: handle empty session in Redis store
docs: update deployment guide for Azure containerized
chore: bump openai-agents dependency to 0.6.5
refactor: extract common guardrail logic to base class
test: add unit tests for CosmosDB session store

Read the full file on GitHub · 253 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. 2d ago First seen · 253 lines · 41 tokens per session scan A 5967e3b92b29

Subscribe to this mod's changes

ak-dev-code-quality is a skill published in the GitHub repository yaalalabs/agent-kernel (145 stars, last pushed 5d ago), licensed Apache-2.0. It adds 41 tokens to every session and 1,705 once invoked, about $0.0002 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.