format-text-files Cursor ruleA
format-text-files from deckflow/deckuse is a Cursor rule: instructions the Cursor agent follows in that repo.
mdr add deckflow/deckuse/.cursor/rules/format-text-files.mdc@git:20260828.26a765aPins git:20260828.26a765a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- Cursor rule
- Repository
- deckflow/deckuse
- Path
.cursor/rules/format-text-files.mdc- Versions recorded
- 1
- Latest version
- git:20260828.26a765a, committed Aug 28, 2026
- Size
- 1,081 bytes
- Repository stars
- 105
- License
- AGPL-3.0
保存文本文件时使用可 diff 的格式化输出(JSON、XML 等).
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 文本文件格式化
工作区中保存的文本类文件应使用稳定、可读的格式,便于 `git diff` 逐行对比变更。
## JSON
- 使用 2 空格缩进:`JSON.stringify(value, null, 2)`
- 文件末尾保留单个换行符
- `.jsonl` / JSON Lines:每行一个紧凑 JSON 对象,行末换行(不要整文件 pretty-print)
## XML / RELS
- 使用缩进(2 空格)和多行布局,不要把整份文档压成一行
- 修改或写入工作区 `source/` 下的 OPC 部件时,保持格式化输出
- 优先通过 `serializeXml` / `formatXmlBytes` 等现有工具写入,不要手写单行 XML
## 其他文本
- 项目内配置文件(`*.json`、`*.md` 等)遵循 Prettier(`pnpm format`)
- 避免无意义的空白或属性重排;只改与任务相关的内容
## 反例
```json
{"revision":"abc","elements":[{"ref":{"documentId":"x"}}]}
```
```xml
<?xml version="1.0"?><p:sld xmlns:p="..."><p:cSld>...</p:cSld></p:sld>
```Read the whole file at its exact version.
How to install
mdr add deckflow/deckuse/.cursor/rules/format-text-files.mdc@sha256:0befd7390ee4fef5The line at the top of this page pins the label git:20260828.26a765a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_2kexfrkq4fgnqjkb)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Aug 28, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (1081 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
deckflow/deckuse · 105 stars · license AGPL-3.0 · pushed 2026-11-07 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_2kexfrkq4fgnqjkb GET https://markdownregistry.com/api/v1/resolve?ref=deckflow/deckuse/.cursor/rules/format-text-files.mdc GET https://markdownregistry.com/api/v1/blob/0befd7390ee4fef55565c8088529e14d6f931483dd7796bf7fb682c06d91745a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: Cursor rules vs AGENTS.md · which agent file does what.