Agent skill

Python Patterns for agent-core

by openJiuwen-ai in openJiuwen-ai/agent-core

Reference for idiomatic Python in the agent-core codebase: immutability, protocols, exception hierarchies, context managers and async patterns.

Apache-2.0Auto-check passedDevelopment

Install Python Patterns for agent-core

skills CLI
$ npx skills add openJiuwen-ai/agent-core --skill python-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openJiuwen-ai/agent-core python-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openJiuwen-ai/agent-core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/python-patterns .claude/skills/python-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-patterns
GitHub stars
442
Token cost
~2.1k tokens
SKILL.md length
223 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reference for idiomatic Python in the agent-core codebase: immutability, protocols, exception hierarchies, context managers and async patterns.

  • Writing new Python modules in the agent-core repository
  • SKILL.md covers Immutability, Protocol-Based Duck Typing, Custom Exception Hierarchies and Context Managers, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Reviewing a change for mutable state, bare except clauses or async mistakes

What it does

This is a style reference for writing Python in the openJiuwen agent-core repository, built from patterns that recur in its code. It leans toward immutable data: frozen dataclasses with dataclasses.replace for modified copies, NamedTuple for fixed records, and typing.Final for constants that must not be reassigned.

Other sections cover typing.Protocol for structural interfaces (named for the AbilityManager and Rail base classes and plugin interfaces), a project-wide exception hierarchy rooted in AgentCoreError with a rule against bare except, class-based and function-based context managers, and async patterns such as gathering coroutines and creating background tasks. The guidance refers to that codebase's own modules, so it is of limited use elsewhere.

When your agent uses it

  • Writing new Python modules in the agent-core repository
  • Reviewing a change for mutable state, bare except clauses or async mistakes
  • Defining a plugin interface with typing.Protocol
  • Adding a custom exception under the project's error hierarchy

Example prompts

  • “Convert this config class to a frozen dataclass following agent-core conventions.”
  • “Review my new Rail subclass for async and exception-handling problems.”
  • “Add a custom exception for sandbox failures under the existing hierarchy.”
  • “Run these three API calls concurrently the way agent-core does it.”

What it can do on your machine

Read from SKILL.md and the folder at commit 8345a27. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and toml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Patterns for agent-core loads about 2.1k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

GitHub didn't answer just now, so the file isn't shown here. It has 223 words (~2,082 tokens).

name
python-patterns

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/python-patterns of openJiuwen-ai/agent-core.

Open the folder on GitHubat commit 8345a27

Compare with similar skills

Python Patterns for agent-core next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Patterns for agent-core compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Patterns for agent-core this skillopenJiuwen-ai/agent-core442—~2.1kAutomated safety check: PassApache-2.0
Cross-Language Coding Standardszereight/gitlab-mcp2k1 repos~1.4kAutomated safety check: PassMIT
Python Devdatabricks-solutions/ai-dev-kit1.9k—~1.6kAutomated safety check: PassCustom licence
Strict Programming Practicescode-yeongyu/oh-my-openagent70k—~9.5kAutomated safety check: PassCustom licence
Dignified Python Standardsdocling-project/docling69k—~1.5kAutomated safety check: PassApache-2.0
R Function Input Validationtidyverse/dplyr5.1k1 repos~2.3kAutomated safety check: PassCustom licence

Similar skills

  • Shared reference for naming, function size, complexity and error handling rules that reviewer agents apply across TypeScript, Python, Go, Rust, Java, C# and Swift.

    2k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Python Dev

    databricks-solutions/ai-dev-kit

    Python development guidance with code quality standards, error handling, testing practices, and environment management.

    1.9k GitHub stars~1.6k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Strict Programming Practices

    code-yeongyu/oh-my-openagent

    Applies strict, type-first coding rules for Python, Rust, TypeScript and Go, loading the matching language reference before the agent writes or edits any code.

    70k GitHub stars~9.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Validates arguments of exported R functions with the standalone check_* type checkers from rlang, in tidyverse style with clear error messages.

    5.1k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Code Review Skill

    awesome-skills/code-review-skill

    Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…

    2.1k GitHub stars~2.8k tokensUpdated 29 days ago
    DevelopmentAuto-check: notes

More from openJiuwen-ai/agent-core

All 10 skills in this repo
  • Skill Safety Evaluator

    openJiuwen-ai/agent-core

    Static safety audit of a SKILL.md that scores five dimensions and acts as a gate: skills below the pass line do not ship, whatever else they score.

    442 GitHub stars~3.5k tokensUpdated today
    Auto-check: warnings
  • Repository Health and Gap Assessor

    openJiuwen-ai/agent-core

    Runs a read-only assessment in one of two modes, a repository health check or a runtime extension gap review, and reports findings as a markdown table.

    442 GitHub stars~613 tokensUpdated today
    Auto-check passed
  • Engineering Communication Rules

    openJiuwen-ai/agent-core

    Chinese-language rules for how an agent writes commit messages, PR descriptions, session journals, handoff issues and requests for help.

    442 GitHub stars~625 tokensUpdated today
    Auto-check passed
  • Agent-Core Python Testing

    openJiuwen-ai/agent-core

    Pytest patterns for the agent-core codebase: a red-green-refactor workflow, conftest fixtures, custom marks, monkeypatch and patch mocking, and async tests.

    442 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Agent-Core Security Checklist

    openJiuwen-ai/agent-core

    A ten-category security checklist for the agent-core codebase, to run before any security-sensitive change or pull request: secrets, input validation, SQL, access control and prompt injection.

    442 GitHub stars~1.7k tokensUpdated today
    Auto-check: notes
  • Verification Loop

    openJiuwen-ai/agent-core

    Formalizes agent-core's make check/type-check/test/fix pipeline into a structured 6-phase verification skill.

    442 GitHub stars~818 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Python Patterns for agent-core

What does Python Patterns for agent-core do?

Reference for idiomatic Python in the agent-core codebase: immutability, protocols, exception hierarchies, context managers and async patterns. This is a style reference for writing Python in the openJiuwen agent-core repository, built from patterns that recur in its code.Final for constants that must not be reassigned.

When should I use Python Patterns for agent-core?

Python Patterns for agent-core fits situations like: writing new Python modules in the agent-core repository; reviewing a change for mutable state, bare except clauses or async mistakes; defining a plugin interface with typing.Protocol; adding a custom exception under the project's error hierarchy.

How do I install Python Patterns for agent-core in Claude Code?

Run `npx skills add openJiuwen-ai/agent-core --skill python-patterns -a claude-code`. Or copy the skill folder (.claude/skills/python-patterns in openJiuwen-ai/agent-core) into .claude/skills/python-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Python Patterns for agent-core in Codex?

Run `npx skills add openJiuwen-ai/agent-core --skill python-patterns -a codex`. Or copy the skill folder (.claude/skills/python-patterns in openJiuwen-ai/agent-core) into .agents/skills/python-patterns in your project. Codex loads it when a task matches its description.

Can I use Python Patterns for agent-core in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openJiuwen-ai/agent-core --skill python-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-patterns, .gemini/skills/python-patterns, .github/skills/python-patterns and .opencode/skills/python-patterns in your project.

What does Python Patterns for agent-core need to run?

SKILL.md names no scripts, command-line tools or credentials: Python Patterns for agent-core is instructions for the agent only.

Does Python Patterns for agent-core access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Python Patterns for agent-core safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Patterns for agent-core use?

Python Patterns for agent-core is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Patterns for agent-core use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Python Patterns for agent-core?

Skills that share tags, products or a category with Python Patterns for agent-core: Cross-Language Coding Standards (zereight/gitlab-mcp, 2k stars), Python Dev (databricks-solutions/ai-dev-kit, 1.9k stars), Strict Programming Practices (code-yeongyu/oh-my-openagent, 70k stars) and Dignified Python Standards (docling-project/docling, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Patterns for agent-core?

openJiuwen-ai (a GitHub organization) maintains it in openJiuwen-ai/agent-core, which has 442 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 8, 2026.

Source: openJiuwen-ai/agent-core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.