Front Project Context logo

Front Project Context

Organization
91160
front-project-context

用于扫描项目,提取编码规范、基础配置(常量、请求封装、公共方法等), 并生成 FRONT_PROJECT_CONTEXT.md 文件,让大模型在后续生成代码时 能主动参照项目已有实现,避免重复造轮子或与规范不符。 当用户提到以下场景时必须使用此 skill: - "扫描项目规范"、"提取编码规范"、"生成规范文档" - "让模型了解项目结构"、"项目基础配置"、"让 AI 知道项目里有哪些公共方法" - "生成 PROJECT_CONTEXT"、"生成 FRONT_PROJECT_CONTEXT" - "模型生成的代码和项目规范不符"、"大模型不知道项目里已有的封装" - 用户希望模型更好地理解项目上下文(Claude Code、Claude.ai 等环境均适用)

Overview

Publisher91160
Repositoryskills
Skill namefront-project-context
Stars
21
Forks
3
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by 91160 on GitHub. Read the source before you install it.

Installation

Install the Front Project Context AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/91160/skills/tree/master/skills/front-project-context
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/91160/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/front-project-context .claude/skills/front-project-context
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Front Project Context in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Front Project Context on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Front Project Context is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Front Project Context Skill

帮助用户对项目进行规范提取,生成核心文件:

  • FRONT_PROJECT_CONTEXT.md:项目知识地图,供模型每次生成代码前查阅

使用前提

  • 需要文件系统访问权限(Claude Code 直接使用;Claude.ai 需用户上传项目文件或在容器中准备好项目)
  • 支持前端项目(Vue / React / Next.js / Nuxt.js 等)及其他类型项目

核心执行原则

能从文件读到的信息,绝对不问用户。

只有以下三种情况才允许询问用户:

  1. 文件中存在真实歧义需要人工判断(如同时检测到 Vue2 和 Vue3 的依赖)
  2. 需要用户指定"基准文件"(统计结果无法判断哪些是团队认可的标准实现)
  3. 自动探测全部完成后,做一次最终核对确认(一次性,放在扫描开始前)

执行流程

第一步:自动探测项目基本情况

不询问用户,直接读取以下文件:

1. package.json          → 框架、UI库、工具链、版本号
2. 所有 README.md        → 项目说明、模块约定、特殊规范、目录说明
3. vite.config.* / next.config.* / vue.config.*  → 构建配置、路径别名
4. .eslintrc* / .prettierrc*  → 代码风格约定
5. tailwind.config.* / uno.config.*  → 样式配置
6. docs/ 目录            → 已有规范文档
7. .cursorrules / CLAUDE.md  → 已有 AI 规范约定
8. tsconfig.json         → TS 配置、路径映射

从以上文件中自动提取:

  • 技术栈(框架 / UI库 / 状态管理 / 请求封装 / 样式方案)
  • 已有规范文档位置
  • 路径别名映射(如 @ → src/)
  • 已有的编码约定(lint 规则等)

探测完成后,向用户展示探测结果摘要,并只问一个问题:

"以上是我从项目文件中自动识别的基本情况,有需要补充或纠正的吗?若没有,我将开始全量扫描。"

收到用户确认后,进入第二步。


第二步:分轮扫描(每轮只做一件事)

关键原则:先统计,再归纳。不允许"看几个文件就下结论"。

每个模块分两轮执行:

采样轮:扫描目标目录下所有文件,列出原始代码片段,不做任何归纳评价。

归纳轮:基于采样结果,统计各写法出现频率,按以下标准分类:

  • 主流写法(> 60%)→ 定为规范
  • 少数写法(< 20%)→ 标注为「遗留代码,待重构」
  • 混用写法 → 标注为「需团队决策」

验证轮:从未参与采样的文件中随机抽查 5 个,验证归纳结果准确性,输出偏差报告。若该模块剩余未采样文件不足 5 个,则对剩余文件全量验证;若采样已覆盖全部文件,则跳过验证轮。

详细的各模块扫描指令见 references/scan-modules.md


第三步:生成 FRONT_PROJECT_CONTEXT.md

在项目根目录生成此文件,结构如下:

markdown
# FRONT_PROJECT_CONTEXT.md
> 此文件由 Claude 自动生成,供 AI 在生成代码时查阅,请勿手动大幅修改。
> 最后更新:{日期}

## 1. 技术栈总览
- 框架:
- UI 组件库:
- 状态管理:
- 请求封装:
- 样式方案:

## 2. 常量速查表
| 常量名 | 值 | 路径 | 用途 |
|-------|-----|------|------|

## 3. 请求方法
- 封装位置:
- 可用方法签名:
- 拦截器说明:
- 真实调用示例:

## 4. 公共方法速查表
| 函数名 | 签名 | 路径 | 用途 |
|-------|------|------|------|

## 5. 全局组件清单
| 组件名 | Props 摘要 | 使用场景 |
|-------|-----------|---------|

## 6. 路由结构摘要
(一级 + 二级路由,标注权限路由)

## 7. 环境变量清单
| 变量名 | 用途 |(不输出真实值)

## 8. 禁止事项
基于已有封装,明确列出禁止行为,例如:
- ❌ 禁止直接使用 axios,统一用 src/utils/request.ts
- ❌ 禁止硬编码接口地址,统一走 constants/api.ts
- ❌ 禁止直接使用 dayjs,统一用 src/utils/date.ts 中的 formatDate()

第四步:输出规范总结

生成完成后,向用户输出:

  1. 文件的路径确认
  2. 发现的主要规范条目摘要(前 10 条)
  3. 发现的问题清单(遗留代码、混用写法),附文件路径
  4. 建议优先统一的 Top 3 问题

增量更新机制

当用户再次运行此技能时(如项目代码有更新),按以下策略执行:

  1. 检测已有文件:检查项目根目录是否已存在 FRONT_PROJECT_CONTEXT.md
  2. 差异扫描:如 FRONT_PROJECT_CONTEXT.md 已存在,则对比当前扫描结果与已有内容,仅更新有变化的章节(新增、删除、修改的常量 / 方法 / 组件等)
  3. 变更日志:在 FRONT_PROJECT_CONTEXT.md 头部的「最后更新」字段旁追加变更摘要,例如:
    > 最后更新:2025-06-15(本次更新:新增 3 个公共方法,移除 2 个废弃常量,更新请求封装签名)
  4. 向用户展示 diff 摘要:列出本次更新了哪些章节、新增/删除/修改了哪些条目,让用户确认

重要执行原则

原则说明
自动探测优先能从文件读到的信息绝对不问用户,package.json / README.md / config 文件是第一信源
README 必读项目根目录及各子目录的 README.md 必须在扫描前全部读取,其中的约定优先级高于代码统计结果
用户指定基准用户指定的"标准文件"优先级高于统计结果
分离提取与归纳不允许边读边总结,必须先采样再统计
区分规范与遗留发现问题代码时明确标注,不将其纳入规范
不输出敏感信息环境变量只列变量名和用途,不输出真实值
歧义才询问只有自动探测产生真实歧义时才打断用户,不因"不确定"就开口问

参考文件

  • references/scan-modules.md:各模块详细扫描指令(结构、命名、组件、API、样式、状态、类型等)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Front Project Context AI skill do?

用于扫描项目,提取编码规范、基础配置(常量、请求封装、公共方法等), 并生成 FRONT_PROJECT_CONTEXT.md 文件,让大模型在后续生成代码时 能主动参照项目已有实现,避免重复造轮子或与规范不符。 当用户提到以下场景时必须使用此 skill: - "扫描项目规范"、"提取编码规范"、"生成规范文档" - "让模型了解项目结构"、"项目基础配置"、"让 AI 知道项目里有哪些公共方法" - "生成 PROJECT_CONTEXT"、"生成 FRONT_PROJECT_CONTEXT" - "模型生成的代码和项目规范不符"、"大模型不知道项目里已有的封装" - 用户希望模型更好地理解项目上下文(Claude Code、Claude.ai 等环境均适用)

Why use Front Project Context on TypingMind?

Because you install it once and use it with any model. Front Project Context is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Front Project Context in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/91160/skills/tree/master/skills/front-project-context. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Front Project Context?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Front Project Context?

As many as you like. As long as a model supports skills, you can use Front Project Context with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Front Project Context AI skill free?

It is published on GitHub by 91160. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇