Token导航 LogoToken导航

Agent Skill · 前端设计

file-organization(文件组织)

file-organization 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

file-organization 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 2,692。

总安装 1,988周安装 82GitHub Stars 11下载 649核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:file-organization(文件组织)
来源仓库:https://github.com/akillness/oh-my-skills
仓库路径:skills/file-organization
安装命令:
npx skills add https://github.com/akillness/oh-my-skills --skill file-organization
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/akillness/oh-my-skills --skill file-organization

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于确定代码库合理结构边界,避免重构引发混乱。适合识别真实组织单元、划分功能/共享边界、制定命名导入规则。使用时需选择合适结构模式,并提供可立即应用的迁移计划。涉及大规模结构调整时应参考边界决策矩阵,确保变更可控可回滚。file-organization 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/file-organization

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/akillness/oh-my-skills --skill file-organizati…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

file-organization 怎么安装?

在终端执行 npx skills add https://github.com/akillness/oh-my-skills --skill file-organization。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

file-organization 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

file-organization 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

file-organization 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

file-organization 用的人多吗?

公开数据是累计安装 1,988 次,近一周安装 82 次,下载 649 次,GitHub 11 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

file-organization 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
file-organization

文件组织 · 本页

1,98811需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

File Organization

Use this skill when the main question is "what structural boundary should this codebase use, and how do we move toward it without turning a reorg into chaos?"

The job is not to dump a giant folder tree and pretend it fits every repo. The job is to:

  1. identify the real organizing unit,
  2. separate feature/shared/framework/package boundaries,
  3. define naming and import rules that prevent drift,
  4. plan the migration safely,
  5. return a structure brief another engineer or agent can apply immediately.

Read references/boundary-decision-matrix.md before recommending a structure. Read references/migration-checklist.md before moving files or renaming directories. Read references/naming-and-import-rules.md when the problem includes barrel files, alias paths, or team conventions.

When to use this skill

  • Choose a maintainable folder strategy for a new repo or app
  • Refactor a repo whose components/, hooks/, utils/, and store/ folders no longer match business boundaries
  • Decide whether code belongs in a feature module, shared layer, route segment, or workspace package
  • Review structure drift before a large reorganization or migration
  • Standardize naming, import paths, and ownership rules across a growing team
  • Decide whether a monorepo/workspace split is justified or premature
  • Produce a migration plan that minimizes broken imports, duplicate files, and half-finished moves

When not to use this skill

  • The main task is designing reusable component APIs, variants, or slot/primitive composition → use ui-component-patterns or design-system
  • The main task is framework state ownership, cache/store boundaries, or URL/form/server-state placement → use state-management
  • The main task is making the repo runnable across machines, services, toolchains, or containers → use system-environment-setup
  • The main task is task runners, bootstrap scripts, hooks, or local-CI command design → use workflow-automation
  • The main task is deployment topology or hosted CI/CD rollout → use deployment-automation or vercel-deploy
  • The repo only needs a tiny mechanical file move with no architectural decision; in that case implement the move directly instead of reopening structure design

Instructions

Step 1: Classify the structural pressure before drawing folders

Normalize the request into this intake first:

structure_intake:
  repo_shape: single-app | app-plus-api | monorepo | library-cli | content-site | unknown
  current_pattern: type-based | feature-based | route-colocated | package-workspace | mixed | unknown
  main_pressure:
    - scattered-feature-code
    - unclear-shared-boundaries
    - framework-routing-collision
    - premature-monorepo-split
    - monorepo-needed-now
    - naming-drift
    - import-chaos
    - migration-risk
    - onboarding-confusion
    - unknown
  change_scope: greenfield | incremental-refactor | major-reorg | audit-only
  primary_boundary_unit: feature | shared-layer | route-segment | package | unknown
  confidence: high | medium | low

If the user is vague, prefer the smallest obvious interpretation and state the assumption.

Step 2: Choose one primary organization mode

Pick exactly one primary mode for the current run:

  1. starter cleanup

- Use when a type-based starter tree is still small enough to fix before it calcifies.

  1. feature modularization

- Use when business areas are spread across technical folders and need feature ownership.

  1. framework colocation

- Use when Next.js / similar router conventions should guide route-segment placement.

  1. shared layer governance

- Use when the repo already has features, but shared code keeps leaking everywhere.

  1. workspace split

- Use when multiple runnable apps/services/packages justify apps/ + packages/ boundaries.

  1. migration audit

- Use when the repo needs a safe move plan more than a brand-new structure proposal.

Step 3: Choose the smallest boundary unit that solves the problem

Use these rules:

  • Prefer feature folders when the same business area touches components, hooks, data access, tests, and state together.
  • Prefer shared layers only for code reused by multiple features with stable ownership.
  • Prefer framework colocation when routing/layout/file-convention semantics are part of the architecture, not just file storage.
  • Prefer workspace packages only when there are multiple deployable apps/services, reusable libraries, or independent dependency/runtime needs.
  • Do not promote a package split just because the repo feels messy; many repos need better feature/shared rules, not a monorepo.
  • Keep generated artifacts, docs, scripts, and tests explicit instead of burying them in ambiguous utility folders.

Step 4: Apply the decision ladder

Use feature modularization when
  • understanding one user-facing capability currently requires opening files across many technical folders
  • changes in one domain repeatedly touch components/, hooks/, utils/, api/, and store/
  • the team needs clear ownership per feature or business area
Use framework colocation when
  • route segments, loaders, layouts, server/client boundaries, or file conventions shape where code must live
  • the framework docs already define special files or reserved paths
  • the real goal is to organize around routes/features without fighting the framework
Use shared layer governance when
  • the repo already has features, but shared folders have become a dumping ground
  • teams keep asking whether something is truly shared or just reused twice
  • import paths and barrel files make boundaries hard to see
Use workspace split when
  • the repo contains multiple apps/services/packages with distinct dependencies or runtime targets
  • shared libraries need versioned or explicit package boundaries
  • build/test/deploy concerns are meaningfully different per package
Use migration audit when
  • the structure idea is mostly known but the move would break imports, docs, tests, or ownership if done casually
  • the team needs staged moves, aliases, codemods, or compatibility shims

Step 5: Keep structural boundaries honest

A good structure recommendation says what it does not own.

Examples:

  • if the real pain is reusable component primitives and API shape, route to ui-component-patterns
  • if the real pain is design-token / library-wide UI governance, route to design-system
  • if the real pain is runtime/services/toolchain setup, route to system-environment-setup
  • if the real pain is recurring scripts and task entrypoints, route to workflow-automation
  • if the real pain is state/caching ownership, route to state-management

Mixed requests are normal. Split them explicitly instead of forcing one folder strategy to solve everything.

Step 6: Set reusable naming and import guardrails

Any recommended structure should name these rules explicitly:

  • Directory purpose — what belongs here and what does not
  • Naming style — folder and file case conventions
  • Shared vs feature rule — when code graduates into shared folders/packages
  • Public API rule — whether features/packages export through one boundary file
  • Import rule — whether deep imports across sibling features are forbidden
  • Test/doc/story placement rule — colocated with feature or centralized by policy

Bad smells:

  • utils/ or shared/ becoming a junk drawer
  • feature code spread across five top-level technical folders
  • barrel files that erase ownership and encourage deep implicit coupling
  • moving to apps/ + packages/ without a real package/runtime boundary
  • framework special files mixed with unrelated domain logic with no colocation rule

Step 7: Plan the migration before changing files

Before moving anything, produce a change plan that covers:

  1. current hotspots and why they are painful
  2. target boundary model
  3. staged move order
  4. alias/import or barrel compatibility strategy
  5. test/build/docs verification steps
  6. rollback or partial-adoption safety

Prefer incremental refactors over one huge rename when the repo is active.

Step 8: Produce the file-organization brief

Return a concise artifact someone can act on immediately.

Preferred format:

# File Organization Brief

## Mode
- Primary mode:
- Why this mode fits:

## Boundary choice
- Primary organizing unit:
- What belongs in feature/shared/route/package boundaries:
- What stays out of scope:

## Recommended structure
- Top-level folders/packages:
- One example feature/package layout:
- Naming/import rules:

## Migration plan
1. First step
2. Second step
3. Verification step

## Handoffs
- Adjacent skills:
- Risks / follow-up work:

Step 9: Prefer clarity over template worship

When modernizing an existing structure:

  • keep the recommendation tied to current repo pressures, not a fashionable template
  • use framework conventions where they help, but do not confuse framework files with the whole architecture
  • move code toward the smallest durable boundary model
  • treat naming/import rules as part of the architecture, not cleanup trivia
  • preserve transferable principles that work across frontend, backend, and fullstack repos

Output format

Always return a file organization brief, repo structure recommendation, or migration audit.

Required qualities:

  • classify the structure problem before prescribing a tree
  • choose one primary organization mode
  • name the boundary unit explicitly
  • include route-outs to adjacent skills
  • provide naming/import guardrails
  • include a migration plan when the repo already exists

Examples

Example 1: Type-based starter tree is collapsing

Input

We have components, hooks, utils, and store, but every checkout change touches all four folders. How should we reorganize this React app?

Good output direction

  • mode: feature modularization
  • recommend feature folders for checkout/auth/catalog with a small shared layer
  • add a rule for when code is allowed to move into shared
  • keep state-ownership specifics routed to state-management

Example 2: Next.js route folders are getting messy

Input

Our Next.js app router repo mixes route files, data helpers, and business logic all over app/. We need a clean structure that still respects framework conventions.

Good output direction

  • mode: framework colocation
  • keep special route files where Next.js expects them
  • colocate route-local code with route segments, move reusable domain logic into feature/shared boundaries outside route-only files
  • mention route groups/private folders if they help organize without changing the URL

Example 3: Team wants to split into packages

Input

Should this repo become apps/ and packages/? We now have a web app, worker, and shared UI library.

Good output direction

  • mode: workspace split
  • justify package boundaries by runnable targets and shared libraries
  • recommend apps/ for deployables and packages/ for reusable libraries/tooling
  • include migration and verification steps instead of only drawing the final tree

Best practices

  1. Start from the pressure on the repo, not from a favorite architecture meme.
  2. Prefer the smallest boundary model that reduces change amplification.
  3. Treat shared code as a governed exception, not the default landing zone.
  4. Let framework conventions inform structure, but do not let them become accidental junk drawers.
  5. Split into packages only when dependencies, runtimes, or deployables truly require it.
  6. Name import and public-API rules early; they are part of the organization system.
  7. Use staged migrations and verification steps for live repos.

References

平台分布

Codex

36.09%
按下载量换算234

Claude

31.46%
按下载量换算204

Cursor

19.35%
按下载量换算126

Gemini CLI

8.58%
按下载量换算56

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills