agentleFS
DeepXivDeepXiv/deepxiv_sdk/skills/deepxiv-fa-law/SKILL.md

deepxiv-fa-law

Skill843 starsChanged 8 months agoMITView on GitHub

Search and read statutes from China and 25 other jurisdictions at article level, and ask cited legal questions over statutes plus judgments. Use when a task needs the text of a Chinese (or other national) law, regulation or article.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always pass -d law: automatic domain picking is still early.

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DeepXiv · Law · Statutes (law)

33,103 statutes / 1,539,593 articles from 26 jurisdictions; article-level hybrid retrieval, Chinese translations and per-article extraction (heading, subjects, conditions, consequences, references).

Corpus: 1,539,593 documents.

Setup

pip install -U deepxiv-sdk      # deepxiv registers a token on first use

With a registered key (https://data.rag.ac.cn/register), search and read are fair use: 60/min, 5 at once, 5,000/day; on the auto-registered token they spend the deepxiv daily limit at the credits listed below. ask draws on the daily ask allowance (resets 00:00 UTC; a site-wide daily total can run out early at peak times), or 3 lifetime trial asks on the auto-registered token. On 429, back off for Retry-After seconds. Data goes to stdout; cost, quota and sources go to stderr. Exit 0 ok, 1 API error, 2 usage error. The general CLI guide is the deepxiv-cli skill.

Start here

deepxiv fa search law "刑法第266条" -k 3   # statute + article number locates directly
deepxiv fa search law "个人信息出境" -F jurisdiction=CHN -F status=in_force -k 5
deepxiv fa read law 刑法 -l brief
deepxiv fa ask "个人信息出境需要满足什么条件" -d law -e medium

Free samples: ids 刑法; queries 诈骗罪 量刑.

Search

deepxiv fa search law "query" [-F FILTER]... [-k N] [--offset N] [--mode M] [--head] [--json]

Modes: hybrid, dense, bm25. Up to 100 hits. Cost 2 (with --head: 3). An empty query is rejected; use "*" to list by filters only. Filters combine with AND; an undeclared field exits 2.

filtertype-F syntaxmeaning
jurisdictionkeywordk=v, k=a,bISO3 jurisdiction, e.g. CHN / JPN / GBR / USA / DEU / KOR; several allowed Values: CHN, JPN, GBR, USA, DEU, KOR, DNK, POL ….
law_idkeywordk=vRestrict to one statute: doc_id or Chinese title / short title
statuskeywordk=v, k=a,bin_force / repealed / not_yet / unknown Values: in_force, repealed, not_yet, unknown.

Advanced filters (see deepxiv fa spec law): scope, granularity, law_type, domain, norm_type, effective_at.

Read

deepxiv fa read law ID [ID...] [-l brief|detail|full] [-e EXTRA] [-p k=v]... [-f json|md|html]
levelcreditsreturns
brief1One statute's card: trilingual title, issuer, type, level, status, dates, one-liner, domains, article count
detail (default)2brief + summary, chapter tree (one line per chapter), key provisions, defined terms, obligations / penalties, typical questions, routing hints (~1–3k tok)
full5Full text, paged by article (offset / limit; see truncated / next_offset)
-e extracreditsreturns
cases2Article → judgments citing it: citation count + list (ranked by query if given, else newest first)

At -l full, -p section=NAME reads one section and -p characters=N the first N characters.

Facets

deepxiv fa facets law FIELD lists the legal values and counts, free. Use it instead of guessing a spelling. Fields: jurisdiction, law_type, status, domain, norm_type.

Ask

deepxiv fa ask "question" -d law [-e low|medium|high] [-p k=v]... [--no-stream] [--json]

Joint agentic Q&A over statutes and judgments: finds the governing articles, reads them, then checks how comparable judgments ruled; answers cite [statute art. N] / [case number], with sources.laws / sources.cases / coverage

Always pass -d law: automatic domain picking is still early.

-p paramtypemeaning
scopeauto/law/case/bothstatutes only / judgments only / both
jurisdictionstringISO3; default unrestricted (the model decides)

What this corpus will and will not tell you

  • law_id accepts a doc_id (jpn:law:労働基準法) or a Chinese title / short title (刑法, 劳动合同法).
  • A query like '刑法第266条' (statute + article number) resolves exactly first.
  • scope=national by default: local regulations copy national text and are the main source of noise.
  • Translations and extractions are model-generated; cite text.src. needs_review=true marks translations of unusual length.
  • knowledge_fill in level=brief / detail is model-recalled metadata, not a source.

Citing

Cite records as [中华人民共和国刑法 第266条]. Say plainly when the corpus has nothing.


Generated by scripts/gen_fa_skills.py from deepxiv fa spec law --json on 2026-10-19. Field names and prices can change; deepxiv fa spec law is the live source.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.