rules
收藏资源简介:
该数据集收集了来自公共GitHub仓库的自然语言LLM智能体规则文件,包括AGENTS.md、CLAUDE.md、.cursor/rules/*.mdc等文件类型,内容以文本形式内联存储。每个数据行对应一个规则文件,并固定到读取时的提交SHA,确保链接始终指向文件的确切字节。数据集包含约1万至10万条记录,适用于文本生成任务,特别是代码智能体规则的学习与生成。数据列包括:file(规则文件全文)、content_sha256(文件SHA-256哈希值)、path(源仓库内路径)、link(固定提交的永久链接)、repo(源仓库的owner/name格式)、stars(爬取时的仓库星标数)、crawled_time(文件爬取时间戳)。数据通过GitHub代码搜索API发现仓库,使用GraphQL固定提交,通过Git Trees API枚举文件树,并从raw.githubusercontent.com获取文件内容。每个文件遵循其源仓库的许可证,数据集整体无统一许可证。
This dataset collects natural language LLM agent rule files from public GitHub repositories, including file types such as AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc, with content stored inline as text. Each data row corresponds to a rule file and is pinned to the commit SHA at the time of reading, ensuring that links always point to the exact bytes of the file. The dataset contains approximately 10,000 to 100,000 records and is suitable for text generation tasks, particularly for learning and generating code agent rules. Data columns include: file (full text of the rule file), content_sha256 (SHA-256 hash of the file), path (path within the source repository), link (permanent link to the fixed commit), repo (source repository in owner/name format), stars (number of repository stars at crawl time), crawled_time (timestamp of file crawling). Data is collected by discovering repositories via the GitHub code search API, using GraphQL to pin commits, enumerating file trees via the Git Trees API, and fetching file content from raw.githubusercontent.com. Each file follows the license of its source repository, and the dataset as a whole has no unified license.
数据集:rules
该数据集包含了从公开GitHub仓库中爬取的自然语言LLM智能体规则文件(如AGENTS.md、CLAUDE.md、.cursor/rules/*.mdc等),文件内容以内联形式存储。
基本信息
- 语言:英语
- 规模:10K < 样本数 < 100K
- 任务类型:文本生成
- 标签:代码、智能体、agents-md、cursor-rules、GitHub
数据列说明
| 列名 | 类型 | 描述 |
|---|---|---|
file |
字符串 | 规则文件的完整文本内容 |
content_sha256 |
字符串 | 文件内容的SHA-256哈希值 |
path |
字符串 | 源仓库中的文件路径 |
link |
字符串 | 指向固定提交版本文件的永久链接 |
repo |
字符串 | 源仓库的所有者/名称 |
stars |
整数 | 爬取时源仓库的星标数 |
crawled_time |
时间戳 | 文件被获取的时间 |
数据格式
- 配置名称:
default - 数据文件路径:
data/*.parquet(训练集)
数据收集方式
- 通过GitHub Code Search API发现仓库
- 通过GraphQL固定到某个提交版本
- 使用Git Trees API枚举文件
- 从
raw.githubusercontent.com获取该提交版本下的文件内容 - 过滤掉整个内容仅为指向其他文件的指针(如
@AGENTS.md)的文件
许可说明
每个文件保留其原始仓库的许可协议,link和repo字段标识了来源。整个数据集不适用单一许可协议。
使用示例
python from datasets import load_dataset ds = load_dataset("Andwwy/rules", split="train")
或通过DuckDB直接查询Parquet文件: sql INSTALL httpfs; LOAD httpfs; SELECT repo, path, stars FROM read_parquet(hf://datasets/Andwwy/rules/data/*.parquet) WHERE path ILIKE %AGENTS.md ORDER BY stars DESC LIMIT 20;





