pr-factory-architect

pr-factory-architect is a skill for Claude Code, Codex from Atman36/codex-maintainer-kit. It costs 102 tokens per session (1,543 once invoked), scanned A, original, MIT.

A code-planning skill that finds one small architectural improvement in a codebase. An architectural improvement changes how code is organised to reduce duplication, coupling, or complexity without a large rewrite.

In plain words
What is it for?
It is for isolating file, network, or other side effects; extracting repeated logic; reducing circular imports; and proposing a clear way to verify the change with tests or a build.
Why use it?
It helps identify a focused refactoring that can fit in a small pull request, without changing a stable public interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/atman36/codex-maintainer-kit/pr-factory-architect
Any agent
npx skills add Atman36/codex-maintainer-kit --skill pr-factory-architect
Clone the repo
git clone --depth 1 https://github.com/Atman36/codex-maintainer-kit

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 pr-factory-architect

README.md
[![agentmods](https://agentmods.dev/badge/skills/atman36/codex-maintainer-kit/pr-factory-architect.svg)](https://agentmods.dev/skills/atman36/codex-maintainer-kit/pr-factory-architect)
Your own site
<a href="https://agentmods.dev/skills/atman36/codex-maintainer-kit/pr-factory-architect"><img src="https://agentmods.dev/badge/skills/atman36/codex-maintainer-kit/pr-factory-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,543 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.1 $0.00102 $0.01543
Opus 5 $0.00051 $0.00772
Sonnet 5 $0.00020 $0.00309
Haiku 4.5 $0.00010 $0.00154

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

Security

Grade A, and why

pr-factory-architect 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 5d 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.

skills/pr-factory-architect/SKILL.md · 196 lines

How it starts

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

Role: Architect

Find one small architectural improvement that reduces complexity.

Inputs

  • {{REPO_ROOT}} - Workspace path

Goal

Find one architectural improvement that:

  • Implementable as small PR (<200 LOC)
  • Reduces complexity/duplication/coupling
  • Does NOT change public API (unless already unstable/internal)
  • Has clear verification path (tests/build)

Examples of Good Improvements

1. Isolate Side-Effect

Extract side-effect (I/O, network, file system) behind interface for testability.

Example:

Current: Business logic directly calls fs.readFileSync()
Improvement: Extract FileReader interface, inject dependency
Benefit: Business logic testable without file system

2. Extract Duplicate Logic

Multiple places have same/similar code → extract into shared module.

Example:

Current: Email validation regex duplicated in 4 files
Improvement: Extract EMAIL_REGEX constant to validation/constants.ts
Benefit: Single source of truth, easier to update

3. Reduce Circular Imports

Module A imports B, B imports A → hard to understand, test, and maintain.

Example:

Current: user.ts ↔ auth.ts (circular)
Improvement: Extract shared types to user-types.ts
Benefit: Clear dependency direction

4. Clarify Boundaries

Core logic mixed with adapters/CLI → hard to test and reuse.

Example:

Current: Business logic in CLI handler
Improvement: Extract to core/ module, CLI calls core
Benefit: Core testable independently, reusable in API

5. Consistent Error Handling

Errors thrown inconsistently (string, Error, custom) → hard to handle.

Example:

Current: throw "Invalid input", throw new Error(), throw custom
Improvement: Introduce AppError base class
Benefit: Consistent error handling, better error context

For detailed patterns and examples, see references/refactoring-patterns.md.

Rules

  • Don't propose big rewrites: Keep it <200 LOC
  • Don't propose new frameworks: Use existing tools
  • Don't add dependencies unless truly necessary
  • Don't change public API unless internal/unstable
  • Schema-valid JSON payload: Build payload conforming to ExecutionResult
  • Persist analysis JSON: Write payload to {{ARTIFACT_DIR}}/architect-<timestamp>.json
  • Chat output format: Return only SAVED_JSON_PATH=<absolute_path_to_json>

Read the full file on GitHub · 196 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 196 lines · 102 tokens per session scan A 84655b68166f

Subscribe to this mod's changes

pr-factory-architect is a skill published in the GitHub repository Atman36/codex-maintainer-kit (2 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 1,543 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

git-workflow

This skill should be used when the user asks to "create git commit", "manage branches", "follow git workflow", "use Conventional Commits", "handle merge conflicts", or asks about git branching strategies, version control best practices, pull request workflows. Provides comprehensive Git workflow guidance for team…

Galaxy-Dawn/claude-scholar · 64 tokens

daily-paper-generator

Use when the user asks to generate daily paper digests on a general topic. This skill supports both arXiv and bioRxiv (or either one), then produces structured Chinese/English summaries for selected papers.

Galaxy-Dawn/claude-scholar · 47 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

map-fast

Minimal workflow for small, low-risk changes — no planning, no learning.

azalio/map-framework · 17 tokens

clipboard

Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".

CodeAlive-AI/ai-driven-development · 36 tokens

neo4j-modeling-skill

Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with…

neo4j-contrib/neo4j-skills · 152 tokens