# jackywxsz/jacky-opc architecture

> Architecture diagram of the GitHub repository jackywxsz/jacky-opc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jackywxsz/jacky-opc
- Repository: https://github.com/jackywxsz/jacky-opc

## Overview

1. This repository is not a conventional app; it is a file-based “skill warehouse” for AI agents. The runtime is whatever agent host you use, such as Claude Code, Codex, Cursor, or Trae Solo. The repo supplies markdown instructions, templates, scripts, and reference material that the agent reads and acts on.

2. The architecture has one clear primary system: `skills/jacky-opc`. The README positions this as the main content-production operating system for a creator or solo business: topic selection, outline generation, drafting, publication prep, review, and knowledge accumulation.

3. The other `jacky-*` directories are specialized support skills rather than standalone products. Each one is an isolated module with its own `SKILL.md`, and some have references, templates, scripts, or agent configs:
   - `jacky-hook`: opening-hook optimization
   - `jacky-wiki`: knowledge-base writing and retrieval
   - `jacky-de-ai`: rewriting to reduce “AI tone”
   - `jacky-xhs-check`: pre-publication risk checks for Xiaohongshu
   - `jacky-illustration`: article illustration planning and generation
   - `jacky-motion`: turning scripts into motion/HTML presentation assets

4. The main data flow is content-lifecycle based, not request/response based. A typical path is:
   topic research in `jacky-opc` → opening refinement in `jacky-hook` → style cleanup in `jacky-de-ai` → risk checking in `jacky-xhs-check` → archival and learning in `jacky-wiki`. For video, `jacky-motion` is the final transformation step; for article visual assets, `jacky-illustration` sits after drafting.

5. `opc-system-template/` is the repository’s core file-system model for the creator workflow. It defines a persistent content workspace with numbered stages:
   user profile, benchmark accounts, personal context, topic decisions, copy structure, opening templates, publication archive, data feedback, and experience accumulation. This is the structural backbone that `jacky-opc` expects to operate against.

6. The template system is intentionally local and editable. It is designed to be copied into a user’s Obsidian vault or ordinary folder and renamed to “OPC System.” That means the architecture assumes human-maintained knowledge files, with the AI agent reading and updating markdown content inside the folder tree.

7. The repository’s operational boundary is “skills plus local workspace,” not hosted services. Environment variables such as `OPC_ROOT`, `WIKI_ROOT`, and `GOOGLE_API_KEY` connect some skills to local directories or external APIs, but the repo itself does not contain secrets, uploads, or a backend service. The README explicitly excludes private drafts, API keys, generated PDFs/images, and local paths.

8. Tooling is lightweight and mostly text-native. The repo uses:
   - Markdown for instructions, knowledge, and templates
   - Shell scripts in `jacky-opc` for workspace setup and material search
   - Python in `jacky-illustration` for image generation workflows
   - HTML templates in `jacky-motion` and `jacky-illustration` for visual output
   - YAML agent config in `jacky-motion`
   This indicates a workflow where the agent orchestrates local text and asset generation rather than calling a large application stack.

9. The documentation subtree under `docs/` provides method-level guidance, not runtime code. Files such as benchmark deconstruction, install skills, production flywheel, review/compounding, and topic system suggest the repo is as much a methodology library as a tooling bundle. These docs explain how the content engine should be run and improved over time.

10. The skill directories are deliberately independent deployment units. The README says each skill can be copied on its own into a skill directory, and each root contains `SKILL.md`. This modular packaging is an important architectural boundary: no shared application state, no monolithic runtime, and no dependency on installing the whole repository.

11. The output side is organized by content stage and platform format. `jacky-opc` templates include short articles, long articles, short-video scripts, and research notes; the OPC template includes separate folders for drafts and published archives, with separate lanes for long-form and short-video content. That separation reflects a pipeline from ideation to draft to published artifact to archived knowledge.

12. Overall, the repo is best diagrammed as a creator operating system with one master workflow (`jacky-opc`) and several specialist transformation tools around it. The key architectural idea is that durable knowledge lives in markdown folders, while agent skills are reusable execution modules that transform that knowledge into drafts, checks, visuals, motion assets, and feedback loops.

Main entry points: [`opc-system-template/README.md`](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/README.md) (OPC template), [`skills/jacky-opc/SKILL.md`](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/SKILL.md) (OPC system), [`skills/jacky-opc/scripts/common.sh`](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/common.sh) (OPC scripts), [`opc-system-template/08.数据反馈/复盘沉淀方法.md`](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/08.数据反馈/复盘沉淀方法.md) (Data feedback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_core["Core workflow"]
  node_n_opc["OPC system<br/>master skill<br/>[SKILL.md]"]
  node_n_opc_scripts["OPC scripts<br/>shell tools<br/>[common.sh]"]
  node_n_opc_init["Init workspace<br/>shell tool"]
  node_n_opc_search["Search materials<br/>shell tool"]
  node_n_opc_templates["Content templates<br/>draft templates<br/>[短文.md]"]
end

subgraph group_g_skills["Specialist skills"]
  node_n_hook["Hook skill<br/>opening optimizer<br/>[SKILL.md]"]
  node_n_deai["DE-AI skill<br/>style rewrite<br/>[SKILL.md]"]
  node_n_xhs["XHS check<br/>risk checker<br/>[SKILL.md]"]
  node_n_wiki["Wiki skill<br/>knowledge base<br/>[SKILL.md]"]
  node_n_illustration["Illustration skill<br/>visual asset tool<br/>[SKILL.md]"]
  node_n_motion["Motion skill<br/>presentation tool<br/>[SKILL.md]"]
end

subgraph group_g_template["OPC workspace"]
  node_n_template["OPC template<br/>workspace template<br/>[README.md]"]
  node_n_t1["User profile<br/>knowledge stage<br/>[用户画像.MD.md]"]
  node_n_t2["Benchmarks<br/>knowledge stage<br/>[对标分析.MD.md]"]
  node_n_t3["Context file<br/>knowledge stage<br/>[我的上下文.MD.md]"]
  node_n_t4["Topic decisions<br/>workflow stage<br/>[选题方法论.md]"]
  node_n_t5["Copy structure<br/>workflow stage<br/>[文案结构.md]"]
  node_n_t6["Openers<br/>workflow stage<br/>[开篇结构.md]"]
  node_n_t7["Published archive<br/>archive stage<br/>[发布运营规则.md]"]
  node_n_t8["Data feedback<br/>feedback stage<br/>[复盘沉淀方法.md]"]
  node_n_t9["Experience base<br/>knowledge stage<br/>[核心概念词典.md]"]
end

subgraph group_g_docs["Method docs"]
  node_n_readme["README<br/>repo overview<br/>[README.md]"]
  node_n_docs_topic["Topic system<br/>method guide<br/>[topic-system.md]"]
  node_n_docs_benchmark["Benchmarking<br/>method guide"]
  node_n_docs_flywheel["Flywheel<br/>method guide"]
  node_n_docs_review["Review loop<br/>method guide"]
  node_n_docs_install["Install skills<br/>setup guide<br/>[install-skills.md]"]
end

node_n_readme -->|"defines core system"| node_n_opc
node_n_readme -->|"describes workspace"| node_n_template
node_n_docs_install -->|"deploys skill"| node_n_opc
node_n_docs_topic -->|"guides selection"| node_n_opc
node_n_docs_benchmark -->|"informs benchmarks"| node_n_template
node_n_docs_flywheel -->|"improves loop"| node_n_template
node_n_docs_review -->|"feeds feedback"| node_n_t8
node_n_opc -->|"uses"| node_n_opc_scripts
node_n_opc_scripts -->|"includes"| node_n_opc_init
node_n_opc_scripts -->|"includes"| node_n_opc_search
node_n_opc -->|"produces drafts"| node_n_opc_templates
node_n_opc -->|"hands off hooks"| node_n_hook
node_n_opc -->|"hands off drafts"| node_n_deai
node_n_opc -->|"pre-publishes"| node_n_xhs
node_n_opc -->|"archives knowledge"| node_n_wiki
node_n_opc -->|"adds visuals"| node_n_illustration
node_n_opc -->|"creates motion"| node_n_motion
node_n_template -->|"contains"| node_n_t1
node_n_template -->|"contains"| node_n_t2
node_n_template -->|"contains"| node_n_t3
node_n_template -->|"contains"| node_n_t4
node_n_template -->|"contains"| node_n_t5
node_n_template -->|"contains"| node_n_t6
node_n_template -->|"contains"| node_n_t7
node_n_template -->|"contains"| node_n_t8
node_n_template -->|"contains"| node_n_t9
node_n_t4 -->|"feeds"| node_n_opc_templates
node_n_t6 -->|"supports"| node_n_hook
node_n_t7 -->|"archives into"| node_n_wiki
node_n_t8 -->|"compounds into"| node_n_t9

click node_n_readme "https://github.com/jackywxsz/jacky-opc/blob/main/README.md"
click node_n_docs_topic "https://github.com/jackywxsz/jacky-opc/blob/main/docs/topic-system.md"
click node_n_docs_benchmark "https://github.com/jackywxsz/jacky-opc/blob/main/docs/benchmark-deconstruction.md"
click node_n_docs_flywheel "https://github.com/jackywxsz/jacky-opc/blob/main/docs/production-flywheel.md"
click node_n_docs_review "https://github.com/jackywxsz/jacky-opc/blob/main/docs/review-and-compounding.md"
click node_n_docs_install "https://github.com/jackywxsz/jacky-opc/blob/main/docs/install-skills.md"
click node_n_opc "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/SKILL.md"
click node_n_opc_scripts "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/common.sh"
click node_n_opc_init "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/init-content-item.sh"
click node_n_opc_search "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/search-materials.sh"
click node_n_opc_templates "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/templates/短文.md"
click node_n_hook "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-hook/SKILL.md"
click node_n_deai "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-de-ai/SKILL.md"
click node_n_xhs "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-xhs-check/SKILL.md"
click node_n_wiki "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-wiki/SKILL.md"
click node_n_illustration "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-illustration/SKILL.md"
click node_n_motion "https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-motion/SKILL.md"
click node_n_template "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/README.md"
click node_n_t1 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/01.用户画像/用户画像.MD.md"
click node_n_t2 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/02.对标账号/对标分析.MD.md"
click node_n_t3 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/03.我的上下文/我的上下文.MD.md"
click node_n_t4 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/04.选题决策/选题方法论.md"
click node_n_t5 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/05.文案结构/文案结构.md"
click node_n_t6 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/06.开篇模板/开篇结构.md"
click node_n_t7 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/07.发布存档/发布运营规则.md"
click node_n_t8 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/08.数据反馈/复盘沉淀方法.md"
click node_n_t9 "https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/09.经验沉淀/核心概念词典.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_opc,node_n_opc_scripts,node_n_opc_init,node_n_opc_search,node_n_opc_templates toneBlue
class node_n_hook,node_n_deai,node_n_xhs,node_n_wiki,node_n_illustration,node_n_motion toneAmber
class node_n_template,node_n_t1,node_n_t2,node_n_t3,node_n_t4,node_n_t5,node_n_t6,node_n_t7,node_n_t8,node_n_t9 toneMint
class node_n_readme,node_n_docs_topic,node_n_docs_benchmark,node_n_docs_flywheel,node_n_docs_review,node_n_docs_install toneRose
```

## Components

### Core workflow

Primary content production operating system and its orchestration

- [OPC system](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/SKILL.md): master skill · Main creator operating system for topic selection, drafting, publishing, and learning · `skills/jacky-opc/SKILL.md`
- [OPC scripts](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/common.sh): shell tools · Workspace setup and material search helpers · `skills/jacky-opc/scripts/common.sh`
- [Init workspace](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/init-content-item.sh): shell tool · Initializes content items in the OPC workspace · `skills/jacky-opc/scripts/init-content-item.sh`
- [Search materials](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/scripts/search-materials.sh): shell tool · Finds supporting materials for content production · `skills/jacky-opc/scripts/search-materials.sh`
- [Content templates](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-opc/templates/短文.md): draft templates · Draft formats for short articles, long articles, short-video scripts, and research notes · `skills/jacky-opc/templates/短文.md`

### Specialist skills

Independent transformation modules used at different content stages

- [Hook skill](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-hook/SKILL.md): opening optimizer · Specialist skill for improving opening hooks · `skills/jacky-hook/SKILL.md`
- [DE-AI skill](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-de-ai/SKILL.md): style rewrite · Rewrites drafts to reduce AI-like tone · `skills/jacky-de-ai/SKILL.md`
- [XHS check](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-xhs-check/SKILL.md): risk checker · Pre-publication risk and compliance checks for Xiaohongshu · `skills/jacky-xhs-check/SKILL.md`
- [Wiki skill](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-wiki/SKILL.md): knowledge base · Archives and retrieves durable knowledge from published work · `skills/jacky-wiki/SKILL.md`
- [Illustration skill](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-illustration/SKILL.md): visual asset tool · Plans and generates article illustrations · `skills/jacky-illustration/SKILL.md`
- [Motion skill](https://github.com/jackywxsz/jacky-opc/blob/main/skills/jacky-motion/SKILL.md): presentation tool · Transforms scripts into motion or HTML presentation assets · `skills/jacky-motion/SKILL.md`

### OPC workspace

Persistent local folder model for creator knowledge and content stages

- [OPC template](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/README.md): workspace template · Persistent local folder structure for the creator workflow · `opc-system-template/README.md`
- [User profile](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/01.用户画像/用户画像.MD.md): knowledge stage · User identity, audience, and positioning notes · `opc-system-template/01.用户画像/用户画像.MD.md`
- [Benchmarks](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/02.对标账号/对标分析.MD.md): knowledge stage · Benchmark account analysis and reference material · `opc-system-template/02.对标账号/对标分析.MD.md`
- [Context file](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/03.我的上下文/我的上下文.MD.md): knowledge stage · Personal context and operational constraints · `opc-system-template/03.我的上下文/我的上下文.MD.md`
- [Topic decisions](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/04.选题决策/选题方法论.md): workflow stage · Topic research, selection, and management lanes · `opc-system-template/04.选题决策/选题方法论.md`
- [Copy structure](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/05.文案结构/文案结构.md): workflow stage · Content structure and framework data · `opc-system-template/05.文案结构/文案结构.md`
- [Openers](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/06.开篇模板/开篇结构.md): workflow stage · Opening templates for different article styles · `opc-system-template/06.开篇模板/开篇结构.md`
- [Published archive](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/07.发布存档/发布运营规则.md): archive stage · Published content archive and publication rules · `opc-system-template/07.发布存档/发布运营规则.md`
- [Data feedback](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/08.数据反馈/复盘沉淀方法.md): feedback stage · Performance data, failures, and winning examples · `opc-system-template/08.数据反馈/复盘沉淀方法.md`
- [Experience base](https://github.com/jackywxsz/jacky-opc/blob/main/opc-system-template/09.经验沉淀/核心概念词典.md): knowledge stage · Compounded concepts, methods, and lessons learned · `opc-system-template/09.经验沉淀/核心概念词典.md`

### Method docs

Repository guidance on how to run and improve the system

- [README](https://github.com/jackywxsz/jacky-opc/blob/main/README.md): repo overview · Explains the skill-warehouse model and the main OPC workflow · `README.md`
- [Topic system](https://github.com/jackywxsz/jacky-opc/blob/main/docs/topic-system.md): method guide · Topic discovery and selection methodology · `docs/topic-system.md`
- [Benchmarking](https://github.com/jackywxsz/jacky-opc/blob/main/docs/benchmark-deconstruction.md): method guide · Competitor and benchmark account deconstruction · `docs/benchmark-deconstruction.md`
- [Flywheel](https://github.com/jackywxsz/jacky-opc/blob/main/docs/production-flywheel.md): method guide · Production loop for iterating content and operations · `docs/production-flywheel.md`
- [Review loop](https://github.com/jackywxsz/jacky-opc/blob/main/docs/review-and-compounding.md): method guide · Review, compounding, and knowledge accumulation guidance · `docs/review-and-compounding.md`
- [Install skills](https://github.com/jackywxsz/jacky-opc/blob/main/docs/install-skills.md): setup guide · How to copy and deploy individual skills into a local agent environment · `docs/install-skills.md`

## Connections

- README → OPC system: defines core system · Repository README presents jacky-opc as the primary operating system
- README → OPC template: describes workspace · README frames the local OPC folder model as the durable content workspace
- Install skills → OPC system: deploys skill · Installation guidance explains how to copy the master skill into an agent environment
- Topic system → OPC system: guides selection · Topic methodology feeds the main content selection flow
- Benchmarking → OPC template: informs benchmarks · Benchmark deconstruction aligns with the benchmark account stage in the workspace
- Flywheel → OPC template: improves loop · Flywheel guidance describes iterative production across the persistent workspace
- Review loop → Data feedback: feeds feedback · Review guidance maps to the data feedback stage and compounding loop
- OPC system → OPC scripts: uses · Master skill is backed by local shell helpers
- OPC scripts → Init workspace: includes · Common scripting layer supports workspace initialization
- OPC scripts → Search materials: includes · Common scripting layer supports material search
- OPC system → Content templates: produces drafts · OPC skill emits content into structured draft templates
- OPC system → Hook skill: hands off hooks · Topic and draft refinement flow into opening optimization
- OPC system → DE-AI skill: hands off drafts · Main drafting flow can be cleaned up by the anti-AI rewrite skill
- OPC system → XHS check: pre-publishes · Publication-ready content can be checked for Xiaohongshu risks
- OPC system → Wiki skill: archives knowledge · Published work and insights are accumulated into the wiki skill
- OPC system → Illustration skill: adds visuals · Article drafting can branch into illustration planning and generation
- OPC system → Motion skill: creates motion · Script outputs can be transformed into motion or HTML presentation assets
- OPC template → User profile: contains · Workspace begins with user profile knowledge
- OPC template → Benchmarks: contains · Workspace includes benchmark account analysis
- OPC template → Context file: contains · Workspace stores personal context and constraints
- OPC template → Topic decisions: contains · Workspace manages topic research and selection
- OPC template → Copy structure: contains · Workspace defines copy structure and frameworks
- OPC template → Openers: contains · Workspace holds opener templates
- OPC template → Published archive: contains · Workspace keeps publication archives
- OPC template → Data feedback: contains · Workspace records performance feedback and failure cases
- OPC template → Experience base: contains · Workspace compounds methods and core concepts
- Topic decisions → Content templates: feeds · Topic decisions shape draft generation inputs
- Openers → Hook skill: supports · Opening template library supports hook optimization
- Published archive → Wiki skill: archives into · Published artifacts and lessons are moved into durable knowledge
- Data feedback → Experience base: compounds into · Feedback and failures are converted into reusable principles
