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.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atman36/codex-maintainer-kit/pr-factory-architect
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.

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/github.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/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 pr-factory-architect

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00041 $0.00617
Sonnet 5.5 $0.00020 $0.00309
Haiku 4.5 $0.00010 $0.00154

Measured 3mo ago against content hash 84655b68166f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 6mo ago), licensed MIT. It adds 102 tokens to every session and 1,543 once invoked, about $0.0004 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-31.

Related

pr-factory-architect compared with skills from other repositories

pr-factory-architect next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pr-factory-architectAtman36/codex-maintainer-kitSkill26mo agoMITA102Claude Code, Codex
clean-codeagent-skills-hub/agent-skills-hubSkill1393d agoMITA21Claude Code
create-pragent-skills-hub/agent-skills-hubSkill1393d agoMITA36Claude Code, Codex
codex-reviewagent-skills-hub/agent-skills-hubSkill1393d agoMITA18Claude Code, Codex
code-that-fits-in-your-headCodeAlive-AI/ai-driven-developmentSkill195yesterdayMITA215Claude Code
git-pr-reviewhuangwb8/skillsSkill515d agoMITA76Claude Code, Codex
challenge-resolveBorda/AI-RigSkill31todayApache-2.0A90Claude Code, Codex