document-path-resolver

document-path-resolver is a cursor rule for coding agents from TashanGKD/tashan-cursor-skills. It costs 83 tokens per session (1,414 once invoked), scanned A, original, MIT.

A Cursor rule for finding the project documents used by product, architecture, testing, planning, and tracking roles. Cursor is a coding tool with rules that guide an agent's work.

In plain words
What is it for?
Use it in projects where document folders vary, so development skills can locate product definitions, UI standards, architecture, tests, plans, and issue trackers.
Why use it?
Projects may store these documents in different folders, so the rule checks project configuration and supplies fallback paths when no mapping exists.

Cursor rule

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 rules/tashangkd/tashan-cursor-skills/document-path-resolver
Clone the repo
git clone --depth 1 https://github.com/TashanGKD/tashan-cursor-skills

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 document-path-resolver

README.md
[![agentmods](https://agentmods.dev/badge/rules/tashangkd/tashan-cursor-skills/document-path-resolver.svg)](https://agentmods.dev/rules/tashangkd/tashan-cursor-skills/document-path-resolver)
Your own site
<a href="https://agentmods.dev/rules/tashangkd/tashan-cursor-skills/document-path-resolver"><img src="https://agentmods.dev/badge/rules/tashangkd/tashan-cursor-skills/document-path-resolver.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,414 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 $0.00083 $0.01414
Opus 5 $0.00042 $0.00707
Sonnet 5 $0.00017 $0.00283
Haiku 4.5 $0.00008 $0.00141

Measured 4d ago against content hash 0993ff00a39a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-path-resolver 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 4d 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.

rules/document-path-resolver.mdc · 126 lines

How it starts

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

文档路径解析规则(document-path-resolver)

核心问题:Skill 体系标准化后,所有 Skill 默认使用 产品经理/技术架构师/ 等角色文件夹路径。 但历史项目(如使用 1_产品定义/2_技术架构/ 数字编号结构的项目)路径不同。 本规则提供一个「适配层」,让 Skill 在不修改自身的情况下支持不同项目的目录结构。


触发条件

任何产品开发相关角色激活时,在读取第一个项目文档之前执行。


执行步骤

Step R1:检查项目配置文件
  Glob: .cursor/project-config.md (在当前项目根目录下查找)
  
  IF 文件存在:
    Read: .cursor/project-config.md
    解析路径映射表(见格式说明)
    将以下路径变量设为配置中定义的值:
      PATH_产品定义    ← 产品定义文档路径
      PATH_UI规范     ← UI设计规范路径(可选)
      PATH_技术架构    ← 技术架构文档路径
      PATH_代码依赖图  ← 代码模块依赖图路径(可选)
      PATH_测试规格    ← 测试规格/主测试文档路径
      PATH_开发计划    ← 开发计划文档路径
      PATH_产品追踪台  ← 产品问题追踪台路径
      PATH_技术追踪台  ← 技术问题追踪台路径
  
  IF 文件不存在:
    使用标准默认路径(见下方「默认路径表」)

Step R2:路径变量可用性验证(可选,耗时较长时跳过)
  对 PATH_产品定义 和 PATH_技术架构 执行存在性验证:
  
  IF 路径不存在:
    输出:「⚠️ [document-path-resolver] [路径] 不存在。
              如果项目使用不同目录结构,请在 .cursor/project-config.md 中配置。
              继续使用此路径(将导致读取空文件或报错)。」
    不阻断执行(让角色自己处理找不到文件的情况)

默认路径表(无 project-config.md 时使用)

路径变量 默认值 说明
PATH_产品定义 产品经理/产品定义.md 产品功能唯一权威描述
PATH_UI规范 产品经理/UI设计规范.md UI/视觉设计规范
PATH_技术架构 技术架构师/技术架构.md 技术栈/模块/接口规范
PATH_代码依赖图 技术架构师/代码级模块依赖全景图.md 代码模块依赖关系(可选)
PATH_测试规格 测试工程师/test-spec.md 测试规格唯一真源
PATH_开发计划 产品经理/开发计划.md 任务状态追踪
PATH_产品追踪台 产品经理/产品问题追踪台.md 产品需求/设计问题
PATH_技术追踪台 技术架构师/技术问题追踪台.md Bug/技术债追踪

project-config.md 格式规范

项目根目录下的 .cursor/project-config.md 使用以下格式:

# [项目名] · 项目文档路径配置

> 由 document-path-resolver 读取,覆盖 Skill 默认路径

## 文档路径映射

| 路径变量 | 实际路径 |
|---------|---------|
| PATH_产品定义 | 1_产品定义/产品定义_核心.md |
| PATH_UI规范 | 1_产品定义/UI设计规范.md |
| PATH_技术架构 | 2_技术架构/技术框架.md |
| PATH_代码依赖图 | 2_技术架构/代码级模块依赖全景图.md |
| PATH_测试规格 | 3_开发计划/测试体系_v2.0/主测试文档.md |
| PATH_开发计划 | 3_开发计划/开发计划.md |
| PATH_产品追踪台 | 产品经理/产品问题追踪台.md |
| PATH_技术追踪台 | 技术架构师/技术问题追踪台.md |

## 项目说明
- 目录结构:数字编号式(1_产品定义/、2_技术架构/、3_开发计划/)
- 追踪台:技术追踪台已存在于 技术架构师/,产品追踪台待创建于 产品经理/

Read the full file on GitHub · 126 lines

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. 4d ago First seen · 126 lines · 83 tokens per session scan A 0993ff00a39a

Subscribe to this mod's changes

document-path-resolver is a cursor rule published in the GitHub repository TashanGKD/tashan-cursor-skills (20 stars, last pushed 5mo ago), licensed MIT. It adds 83 tokens to every session and 1,414 once invoked, about $0.0004 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-30.