Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when generating computer system validation (CSV) documentation for pharmaceutical and medical device industries, including validation plans, URS, FS, IQ/OQ/PQ documents, and traceability matrices.
SkillScore84/100
Test results 84
3/3 safety checks passed
16%84%of test cases passed +68 pts
Passed 21 of 25 test cases with the skill, and 4 of 25 without it.
17 fixed4 passed either way4 still failing0 broke
One test taskWe want to perform a sync between our URS template and `requirements.json`, but strictly enforce that updates only flow from the template file into the JSON file (one-way read from template). Which flag and value configure this specific sync direction?
Adds every file the skill has, pinned so you can update it. No account needed.
pip install "decimalai>=0.15"
decimalai skills add leoyeai-csv-documentation-generator
claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"The same install from Python, for a notebook or a setup script.
pip install "decimalai>=0.15"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
print("Added. Start Claude Code with the command below.")claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"Type these in a Claude Code session. No account or API key. It writes the skill and any files it bundles, and asks first when its safety rating isn't Passed.
/plugin marketplace add decimal-labs/decimalai-claude-plugins
/plugin install decimalai@decimalai/decimalai:install leoyeai-csv-documentation-generatorThe plugin needs python3 and curl on your machine.
No Python or account. Claude Code picks it up in its next session.
curl -fsSL --create-dirs -o .claude/skills/leoyeai-csv-documentation-generator/SKILL.md https://app.decimal.ai/s/leoyeai-csv-documentation-generator/SKILL.md.claude/skills/leoyeai-csv-documentation-generator/SKILL.mdThis gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"
decimalai skills add leoyeai-csv-documentation-generatorimport asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdimport asyncio
from pathlib import Path
from claude_agent_sdk import ClaudeAgentOptions, query
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
options = ClaudeAgentOptions(system_prompt=f"You are a helpful agent.\n\n{skill}", max_turns=6)
async def main():
async for message in query(prompt="Hello!", options=options):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"
decimalai skills add leoyeai-csv-documentation-generatorfrom agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from agents import Agent, Runner
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = Agent(name="support", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"
decimalai skills add leoyeai-csv-documentation-generatorimport json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from openai import OpenAI
client = OpenAI()
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[
{"role": "system", "content": f"You are a helpful agent.\n\n{skill}"},
{"role": "user", "content": "Hello!"},
],
).choices[0].messageThis gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"
decimalai skills add leoyeai-csv-documentation-generatorimport anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
import anthropic
client = anthropic.Anthropic()
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
reply = client.messages.create(
model="claude-haiku-5-5",
max_tokens=4096,
system=f"You are a helpful agent.\n\n{skill}",
messages=[{"role": "user", "content": "Hello!"}],
)This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"
decimalai skills add leoyeai-csv-documentation-generatorfrom google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from google import genai
from google.genai import types
client = genai.Client()
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
response = client.models.generate_content(
model="gemini-3.5-flash",
contents="Hello!",
config=types.GenerateContentConfig(system_instruction=f"You are a helpful agent.\n\n{skill}"),
)This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openai
decimalai skills add leoyeai-csv-documentation-generatorfrom langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openaifrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from langchain.agents import create_agent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = create_agent("openai:gpt-5.4-mini", tools=[], system_prompt=f"You are a helpful agent.\n\n{skill}")
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 23 other files are not included.
CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"
decimalai skills add leoyeai-csv-documentation-generatorimport decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()The same install from Python, for a notebook or a setup script. CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()No DecimalAI package. CrewAI's own loader reads the folder, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=[Path(".agents/skills")],
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"
decimalai skills add leoyeai-csv-documentation-generatorfrom decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from google.adk.agents import LlmAgent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = LlmAgent(
name="support",
model="gemini-3.5-flash",
instruction=lambda context: f"You are a helpful agent.\n\n{skill}",
)This gets SKILL.md only. The skill's 23 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"
decimalai skills add leoyeai-csv-documentation-generatorfrom pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from pydantic_ai import Agent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = Agent("openai:gpt-4o-mini", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")This gets SKILL.md only. The skill's 23 other files are not included.
Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagents
decimalai skills add leoyeai-csv-documentation-generatorimport decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
The same install from Python, for a notebook or a setup script. Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from deepagents import create_deep_agent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = create_deep_agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 23 other files are not included.
Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-framework
decimalai skills add leoyeai-csv-documentation-generatorimport asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
The same install from Python, for a notebook or a setup script. Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-frameworkfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdimport asyncio
from pathlib import Path
from agent_framework import Agent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = Agent(client=client, instructions=f"You are a helpful agent.\n\n{skill}")
asyncio.run(agent.run("Hello!"))This gets SKILL.md only. The skill's 23 other files are not included.
Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agents
decimalai skills add leoyeai-csv-documentation-generatorfrom decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
The same install from Python, for a notebook or a setup script. Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("leoyeai-csv-documentation-generator")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdfrom pathlib import Path
from strands import Agent
skill = Path(".agents/skills/leoyeai-csv-documentation-generator/SKILL.md").read_text()
agent = Agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent("Hello!")This gets SKILL.md only. The skill's 23 other files are not included.
Adds every file the skill has, pinned so you can update it. Cursor, Copilot, Cline and Warp read this folder by themselves.
pip install "decimalai>=0.15"
decimalai skills add leoyeai-csv-documentation-generatorNo Python or account. Cursor, Copilot, Cline and Warp read this folder by themselves.
curl -fsSL --create-dirs -o .agents/skills/leoyeai-csv-documentation-generator/SKILL.md https://app.decimal.ai/s/leoyeai-csv-documentation-generator/SKILL.md.agents/skills/leoyeai-csv-documentation-generator/SKILL.mdThis gets SKILL.md only. The skill's 23 other files are not included.
Give its text to your model as instructions. No account or package needed.
This gets SKILL.md only. The skill's 23 other files are not included.
Raw files: /s/leoyeai-csv-documentation-generator/SKILL.md · /s/leoyeai-csv-documentation-generator.json
Fetch the file and give its text to your model as instructions. No account or package needed.
curl -fsSL https://app.decimal.ai/s/leoyeai-csv-documentation-generator/SKILL.mdcurl -fsSL https://app.decimal.ai/s/leoyeai-csv-documentation-generator.jsonThis gets SKILL.md only. The skill's 23 other files are not included.
You don't need a DecimalAI account.
Saved prompts and skills, pinned versions, and traces of this skill in your runs. DecimalAI does not run your agent.
Claude Code reads files from your project, so DecimalAI config does not apply there.
On Claude Agent SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI Agents: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Anthropic: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Gemini API: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On LangChain: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On CrewAI: set DECIMAL_API_KEY and add decimalai.init(crewai=True) to record runs and skill use. The skill version stays in your repo.
On Google ADK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Pydantic AI: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Deep Agents: set DECIMAL_API_KEY and add decimalai.init(langchain=True) to record runs and skill use. The skill version stays in your repo.
On Microsoft Agent Framework: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
On Strands: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
Editors read files from your project, so DecimalAI config does not apply there.
Anywhere else: record a use with decimalai.log_skill_activation() inside a trace.
Generate Computerized System Validation (CSV) documentation for pharmaceutical and medical device industries. Supports bilingual (Chinese/English) templates and multiple output formats (Word/Excel).
Use this skill when:
| System Type | GAMP Category | Documents |
|---|---|---|
| EDC (Electronic Data Capture) | Category 4/5 | All 12 documents |
| CTMS (Clinical Trial Management) | Category 4 | VP, URS, FS, RA, IQ, OQ, RTM |
| LIMS (Laboratory Information Management) | Category 4/5 | All 12 documents |
| MES (Manufacturing Execution System) | Category 4 | All 12 documents |
| ERP (Enterprise Resource Planning) | Category 4 | VP, URS, RA, IQ, OQ |
| SCADA/DCS | Category 2/3 | VP, URS, IQ, OQ, PQ |
| Custom Software | Category 3/4 | VP, URS, RA, IQ, OQ |
# Navigate to skill directory
cd <SKILL_DIR>/csv-documentation-generator
# Run script - will automatically create virtual environment on first run
python3 scripts/generate.py vp --project "XX系统" --system "EDC v1.0" --output ./output/
# Note: If --category is not specified, interactive GAMP category selection will be prompted
# The script provides bilingual (Chinese/English) guidance based on GAMP 5 Second Edition
# Generate Validation Plan (with category specified)
python3 scripts/generate.py vp --project "XX系统" --system "EDC v1.0" --category 4 --output ./output/
# Generate full validation package
python3 scripts/generate.py all --project "XX系统" --system "MES" --category 4 --output ./validation/
# Navigate to skill directory
cd <SKILL_DIR>/csv-documentation-generator
# Parse source code for requirements (extracts @URS, @TEST, @FS, @TS markers)
python3 scripts/cli.py parse ./src
# For AI agents (non-interactive mode), use --auto-add:
python3 scripts/cli.py parse ./src --auto-add
# Review extracted requirements
cat requirements.json
This skill automatically handles environment setup:
.venv virtual environment in skill directoryThis ensures consistent behavior and avoids dependency conflicts.
If --category is not specified, the script will prompt with bilingual (Chinese/English) guidance:
GAMP 5 (Second Edition) Category Selection:
[1] Infrastructure Software - 基础设施软件
[2] Firmware - 固件
[3] Commercial Off-The-Shelf (COTS) - Non-configured - 商用现货软件 (不可配置)
[4] Configured COTS - 配置型 COTS 软件 (e.g., EDC, CTMS, LIMS, MES)
[5] Custom / Critical Application - 定制/关键应用
AI agents should guide users to select the appropriate category based on GAMP 5 Second Edition principles.
| Command | Description | Output Format |
|---|---|---|
generate.py vp | Validation Plan | .docx |
generate.py urs | User Requirements Specification | .docx |
generate.py fs | Functional Specification | .docx |
generate.py ts | Technical Specification | .docx |
generate.py ra | Risk Assessment (FMEA) | .docx |
generate.py iq | Installation Qualification | .docx |
generate.py oq | Operational Qualification | .docx |
generate.py pq | Performance Qualification | .docx |
generate.py rtm | Traceability Matrix | .xlsx |
generate.py vsr | Validation Summary Report | .docx |
generate.py checklist | Validation Checklist | .xlsx |
generate.py test-case | Test Case Template | .xlsx |
generate.py all | Full validation package | .docx / .xlsx |
| Option | Description | Required |
|---|---|---|
--project | Project name | Yes |
--system | System name and version | Yes |
--category | GAMP category (1-5). If not specified, interactive selection will be prompted with bilingual GAMP 5 guidance. | No (will prompt) |
--bilingual | Enable bilingual mode: 'true' or 'false' (default: true). When true, headers remain bilingual and content follows --language. | No |
--language | Primary language for content: 'zh' (Chinese) or 'en' (English) (default: zh). Used when bilingual=false or for content in bilingual mode. | No |
--verbose / -v | Show detailed progress information (default: simplified output) | No |
--output | Output directory | Yes |
--format | Output format: docx, xlsx, or both (default: both) | No |
All generated documents follow consistent naming and formatting rules:
| Document Type | Format | Example |
|---|---|---|
| Validation Plan | {TYPE}_{PROJECT}.{ext} | VP_XX系统.docx |
| User Requirements | {TYPE}_{PROJECT}.{ext} | URS_XX系统.docx |
| Functional Specification | {TYPE}_{PROJECT}.{ext} | FS_XX系统.docx |
| Traceability Matrix | RTM_{PROJECT}.{ext} | RTM_XX系统.xlsx |
{output_dir}/
├── VP_项目名.docx
├── URS_项目名.docx
├── FS_项目名.docx
├── TS_项目名.docx
├── RA_项目名.docx
├── IQ_项目名.docx
├── OQ_项目名.docx
├── PQ_项目名.docx
├── VSR_项目名.docx
├── RTM_项目名.xlsx
└── CHECKLIST_项目名.xlsx
Fonts:
Colors:
Common variables used in templates:
| Variable | Description | Example |
|---|---|---|
{PROJECT_NAME} | Project name | 临床试验系统 |
{SYSTEM_NAME} | System name | EDC v1.0 |
{SYSTEM_VERSION} | System version | 1.0 |
{GAMP_CATEGORY} | GAMP category | 4 |
{DOC_ID} | Document ID | URS-001 |
{DATE} | Document date | 2024-01-01 |
{AUTHOR} | Document author | 张三 |
{REVIEWER} | Reviewer name | 李四 |
{APPROVER} | Approver name | 王五 |
| Category | Description | Validation Approach |
|---|---|---|
| 1 | Operating System | Legacy |
| 2 | Firmware | Simplified |
| 3 | Commercial-off-the-shelf (COTS) | Risk-based |
| 4 | Configured COTS | Risk-based |
| 5 | Custom/Critical | Full validation |
This skill includes compliance checks for:
21 CFR Part 11: Electronic Records and Signatures
EU Annex 11: Computerised Systems
ALCOA+: Data Integrity
This skill encapsulates the following semantic actions for GxP document generation:
parse_requirements(source_path) → RequirementsDB
│
▼
generate_vp(context) → Document
│ ──────────────────────► generate_urs(context) → Document
│ │
│ ◄── (URS traceability) ──────────────────┤
│ ▼
├────────────────────────────────────► generate_fs(context) → Document
│ │
│ ◄── (FS technical specs) ─────────────────┤
│ ▼
└────────────────────────────────────► generate_ra(context) → Document
│
┌───────────┴───────────┐
▼ ▼
generate_iq_oq_pq(context) generate_rtm(context)
│ │
└───────────┬───────────┘
▼
generate_vsr(context) → Document
| Action | Description | Pre-conditions |
|---|---|---|
parse_requirements() | Parse @URS, @FS, @TEST markers from source code | Source code available |
generate_vp() | Create Validation Plan | Project name, system name, GAMP category |
generate_urs() | Create User Requirements Specification | System context, GxP scope |
generate_fs() | Create Functional Specification | URS requirements linked |
generate_ra() | Create Risk Assessment | URS priorities, GxP scope |
generate_iq_oq_pq() | Create Qualification Protocols | RA risk levels, TS config |
generate_rtm() | Create Traceability Matrix | URS, FS, test cases linked |
generate_vsr() | Create Validation Summary Report | All test results, deviations |
sync_bidirectional() | Sync requirements ↔ templates | Templates and requirements.json exist |
run_compliance_check() | Verify GxP compliance | Requirements and test results |
| Flow | Semantic Meaning |
|---|---|
| VP → URS | Business process analysis defines GxP scope for requirements |
| URS → FS | Functional requirements trace to design specifications |
| URS → RA | Requirement priority determines risk severity |
| RA → Test | Risk level scales testing rigor (IQ/OQ/PQ scope) |
| All → RTM | Complete traceability matrix for regulatory audit |
Critical Thinking Constraints and Content Fill Prompts are defined in prompts.md.
For GAMP 5 M12 Critical Thinking constraints, document generation triggering conditions, and content fill prompt templates, see prompts.md.
Reference materials included in references/ folder:
| File | Description |
|---|---|
gamp-5.md | GAMP 5 quick reference guide |
21cfr-part11.md | 21 CFR Part 11 key requirements |
annex-11.md | EU Annex 11 requirements |
data-integrity.md | ALCOA+ data integrity principles |
Complete fill examples are provided in templates/examples/ directory:
| Example File | Description |
|---|---|
urs-example.md | URS with complete requirement examples |
fs-example.md | FS with traceability examples |
ra-example.md | RA with hierarchical risk examples |
iq-example.md | IQ with qualification check examples |
AI agents SHOULD reference these examples for content style guidance when filling templates.
All templates support Smart Bilingual output controlled by --bilingual and --language flags:
--bilingual | --language | Behavior |
|---|---|---|
true (default) | zh | Headers bilingual, content in Chinese |
true (default) | en | Headers bilingual, content in English |
false | zh | Pure Chinese output |
false | en | Pure English output |
Templates use dual-language format for headers:
## 1. 目的 / Purpose
本文档定义了... / This document defines...
Tables use dual-language headers:
| 中文 | English |
|---|---|
| 验证计划 | Validation Plan |
| 用户需求 | User Requirements |
Content cells use format like 中文 / English:
| 模块 / Module | 描述 / Description |
|---|---|
| 用户管理 / User Management | 系统应... / System should... |
This skill supports GAMP 5 compliant requirements traceability across the entire validation lifecycle.
代码注释 (@URS[module])
↓
requirements.json (需求解析)
↓
URS 模板 (自动同步章节)
↓
FS/TS 文档 (引用需求ID)
↓
测试用例 (关联需求ID)
↓
测试结果 (解析需求ID)
↓
RTM (追溯矩阵自动生成)
When generating code, AI agents MUST include requirement markers for automatic traceability. Use the standardized @REQ format:
# @REQ URS-001 - 系统应支持基于角色的访问控制 (RBAC)
# @REQ URS-002 - 用户密码必须满足复杂度要求(至少8位)
# @FS FS-001
# @TS TS-001
# @TEST[OQ-UM-001] - 验证用户角色分配功能
# @RISK H # High risk module
def assign_role(user_id: str, role: str) -> bool:
'''
@REQ URS-001 - Role-based access control required
@TEST[OQ-UM-001] - Test role assignment
'''
# Implementation...
Standard comment formats:
| Pattern | Example | Description |
|---|---|---|
// @REQ URS-xxx | // @REQ URS-001 - 系统应支持RBAC | Requirement with ID and description |
# @REQ | # @REQ URS-001 - 描述 | Python-style comment |
/* @REQ */ | /* @REQ URS-001 - 描述 */ | Multi-line comment |
// @TEST[type-id] | // @TEST[OQ-UM-001] - 验证 | Test case link |
// @FS | // @FS FS-001 | FS reference |
// @TS | // @TS TS-001 | TS reference |
// @RISK [H/M/L] | // @RISK H | Risk level (High/Medium/Low) |
Risk levels:
H (High): Security, compliance, electronic signature, audit trail relatedM (Medium): Default for most requirementsL (Low): Simple features, documentation, reports| Module ID | 中文名 | English Name | Test Prefix |
|---|---|---|---|
user_mgmt | 用户管理 | User Management | UM |
audit_trail | 审计追踪 | Audit Trail | AT |
data_mgmt | 数据管理 | Data Management | DM |
business_func | 业务功能 | Business Functions | BF |
reporting | 报告功能 | Reporting | RP |
integration | 接口集成 | Integration | INT |
security | 安全 | Security | SEC |
compliance | 合规 | Compliance | CMP |
注意: 章节号(4.X)是动态分配的,基于模板中已有的章节。同步时会自动为新模块分配下一个可用编号。
⛔ This step is NOT automatic. You must manually add these rules to your agent's system prompt (AGENTS.md) if you want @REQ/@TEST annotations to apply across ALL skills.
To enable cross-skill annotation enforcement, add the following to your AGENTS.md or agent system prompt:
Code Annotation Rules (for GxP traceability):
- When writing code that implements requirements, add @REQ markers: # @REQ URS-xxx - description
- When writing test cases, add @TEST markers: # @TEST[OQ-UM-xxx] - description
- Mark high-risk code sections with @RISK H (security, compliance, audit trail related)
- Mark medium-risk code with @RISK M
- Mark low-risk code with @RISK L
Why this is needed: OpenClaw skills only execute when active. There is no mechanism to make instructions persist across skill switches except via the system prompt.
See STANDARDS.md for full documentation and standards/code-annotations.json for the standards file.
Test case IDs follow the format: {IQ|OQ|PQ}-{ModulePrefix}-{Number}
| Type | Example | Description |
|---|---|---|
| IQ | IQ-UM-001 | Installation Qualification test |
| OQ | OQ-UM-001 | Operational Qualification test |
| PQ | PQ-UM-001 | Performance Qualification test |
Before generating documents, use --sync to automatically update templates with new requirements:
# Generate URS and sync requirements to template
python3 scripts/generate.py urs --sync \
--project "临床系统" \
--system "EDC v1.0" \
--category 4 \
--output ./validation/
# Generate full validation package with sync
python3 scripts/generate.py all --sync \
--project "XX系统" \
--system "MES" \
--category 4 \
--output ./validation/
What --sync does:
requirements.json for all requirementsUse --sync-template-to-db to extract requirements from templates and add them to requirements.json:
# Extract requirements from urs.md template to requirements.json
python3 scripts/generate.py urs --sync-template-to-db \
--project "临床系统" \
--system "EDC v1.0" \
--category 4 \
--output ./validation/
What --sync-template-to-db does:
| URS-xxx | description | formatFor interactive step-by-step document generation with confirmation prompts:
python3 scripts/generate.py all --interactive \
--project "临床系统" \
--system "EDC v1.0" \
--category 4 \
--output ./validation/
Interactive workflow:
[1/11] 解析代码注释...
→ 按 Enter 继续,'s' 跳过,'q' 退出:
[2/11] 同步需求到数据库...
→ 按 Enter 继续,'s' 跳过,'q' 退出:
[3/11] 生成 URS...
→ 按 Enter 继续,'s' 跳过,'q' 退出:
✓ ./output/URS_临床系统.docx
...
Options:
Enter - Execute this steps - Skip this stepq - Quit (already generated files are preserved)Run GAMP 5 compliance validation to check requirements coverage and test coverage:
# Run compliance check (text output)
python3 scripts/generate.py check \
--requirements requirements.json \
--test-results test_results.json
# Run compliance check (JSON output for CI/CD)
python3 scripts/generate.py check \
--requirements requirements.json \
--test-results test_results.json \
--output-format json
Compliance checks performed:
Exit codes:
0 - All checks passed1 - Warnings present2 - Errors foundUse --diff-only to skip regeneration when requirements haven't changed:
# Only regenerate RTM if requirements changed
python3 scripts/generate.py rtm --diff-only \
--project "临床系统" \
--system "EDC v1.0" \
--category 4 \
--output ./validation/
How it works:
.requirements.hash in output directoryInstall post-commit hooks to automatically run compliance checks after code commits:
# Install hooks locally (per-project)
./scripts/git-hooks/install.sh --local
# Install hooks globally (all projects)
./scripts/git-hooks/install.sh --global
# Uninstall hooks
./scripts/git-hooks/install.sh --uninstall
What the hook does:
Use --sync for bidirectional sync between template and requirements.json:
# Full bidirectional sync (both directions)
python3 scripts/generate.py urs --sync \
--project "临床系统" \
--system "EDC v1.0" \
--category 4
# Only sync template → JSON
python3 scripts/generate.py urs --sync --sync-direction to-json
# Only sync JSON → template
python3 scripts/generate.py urs --sync --sync-direction to-template
Conflict resolution:
# Keep template descriptions on conflict
python3 scripts/generate.py urs --sync --conflict-resolution template
# Keep JSON descriptions on conflict
python3 scripts/generate.py urs --sync --conflict-resolution json
# Keep newer version based on updated_at
python3 scripts/generate.py urs --sync --conflict-resolution newer
Section numbering behavior:
### 4.X headersrequirements.json will have sections createdpm_query, multi_lock) are supported and will be assigned the next available section numberFor projects with multiple subprojects (monorepo structure):
# Auto-detect monorepo root
python3 scripts/generate.py rtm --project "临床系统" --system "EDC v1.0"
# Explicitly specify monorepo root
python3 scripts/generate.py rtm --project "临床系统" --system "EDC v1.0" \
--project-root /path/to/monorepo
Detected monorepo layouts:
apps/, packages/, projects/, modules/, services/ directoriesrequirements.jsonTemplates are versioned for compatibility tracking:
# Check compatibility (automatic on generate)
python3 scripts/generate.py rtm --project "系统" --system "v1.0" --category 4
# Specify template version
python3 scripts/generate.py rtm --template-version 1.2.0 \
--project "系统" --system "v1.0" --category 4
Automatic migrations:
Use provided CI/CD templates for automated documentation generation:
GitHub Actions (templates/ci/github-actions.yml):
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- run: python scripts/generate.py check --output-format json
- run: python scripts/generate.py all --diff-only
GitLab CI (templates/ci/gitlab-ci.yml):
generate:rtm:
extends: .csv-docs-base
script:
- python scripts/generate.py rtm --diff-only
artifacts:
paths:
- validation/RTM*.xlsx
The URS/FS/TS IDs and descriptions in templates are examples only. For actual projects:
--sync-template-to-db to populate initial requirements, then customizePer GxP requirements, any system change requires a risk assessment. When generating RA documents, include the change description:
python3 scripts/generate.py ra \
--project "临床系统" \
--system "EDC v1.0" \
--change-description "升级数据库从 v12 到 v14" \
--output ./validation/
# Navigate to skill directory
cd <SKILL_DIR>/csv-documentation-generator
# Parse source code for requirements using csv-docs CLI
python3 scripts/cli.py parse ./src
# View extracted requirements
cat requirements.json
| Issue | Solution |
|---|---|
| python-docx not installed | Run: pip install -r requirements.txt |
| Encoding errors | Ensure UTF-8 encoding in your terminal |
| Template not found | Check you are in the correct directory |
Run with verbose output:
python3 scripts/generate.py --help
For AI agents running in non-interactive mode, use --auto-add to automatically add all parsed requirements:
# Parse and auto-add all requirements (non-interactive)
python3 scripts/cli.py parse ./src --auto-add
# Generate with verbose output
python3 scripts/generate.py all --project "XX系统" --system "System v1.0" --category 4 --verbose
python3 scripts/generate.py urs \
--project "临床试验管理系统" \
--system "CTMS v2.0" \
--category 4 \
--bilingual true \
--output ./validation/
python3 scripts/generate.py ra \
--project "质量管理系统" \
--system "QMS v1.5" \
--category 4 \
--critical-functions "数据录入,审计追踪,权限控制" \
--output ./validation/
python3 scripts/generate.py rtm \
--project "实验室系统" \
--system "LIMS v3.0" \
--category 4 \
--urs-file ./URS-001.md \
--fs-file ./FS-001.md \
--output ./validation/
Skills that do similar work, with their headline benchmark lift.
From the same source and nearby in the catalogue.