← 返回 Skills 市场
228
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install digital-twin-patient-builder
功能描述
Build digital twin patient models to test drug efficacy and toxicity in virtual environments
使用说明 (SKILL.md)
Digital Twin Patient Builder (ID: 208)
Function Overview
Build a "digital twin" model of a patient, integrating genotype, clinical history, and imaging data to test the efficacy and toxicity of different drug doses in a virtual environment.
Use Cases
- Personalized drug treatment plan design
- Drug dose optimization
- Adverse reaction risk assessment
- Clinical trial virtual simulation
Input
| Data Type | Description | Format |
|---|---|---|
genotype |
Patient genotype data (SNPs, CNVs) | JSON |
clinical_history |
Clinical history and laboratory indicators | JSON |
imaging_features |
Imaging features (MRI, CT, etc.) | JSON |
Output
| Output Type | Description |
|---|---|
efficacy_prediction |
Efficacy prediction results |
toxicity_prediction |
Toxicity reaction prediction |
optimal_dose |
Optimal dose recommendation |
Usage
Command Line Usage
python scripts/main.py --patient patient_data.json --drug drug_profile.json --doses "[50, 100, 150]"
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
--patient |
string | - | Yes | Path to patient data JSON file |
--drug |
string | - | Yes | Path to drug profile JSON file |
--doses |
string | - | Yes | Dose range to test (JSON array format) |
--output, -o |
string | - | No | Output file path for simulation results |
--simulation-days |
int | 30 | No | Number of days to simulate |
--timestep |
float | 0.5 | No | Simulation timestep in days |
Python API
from scripts.main import DigitalTwinBuilder
builder = DigitalTwinBuilder()
twin = builder.build_twin(patient_data)
results = twin.simulate_drug_regimen(drug_profile, dose_range)
Technical Architecture
digital-twin-patient-builder/
├── SKILL.md # This file
├── scripts/
│ └── main.py # Core implementation
│
├── Core Components:
│ ├── PatientProfile # Patient profile management
│ ├── GenotypeModel # Genotype modeling
│ ├── ClinicalModel # Clinical data modeling
│ ├── ImagingModel # Imaging feature modeling
│ ├── DigitalTwin # Digital twin main class
│ ├── PharmacokineticModel # Pharmacokinetic model
│ └── DrugSimulator # Drug simulator
Dependencies
- numpy >= 1.21.0
- scipy >= 1.7.0
- pandas >= 1.3.0
Example Data Format
Patient Data (patient_data.json)
{
"patient_id": "P001",
"genotype": {
"CYP2D6": "*1/*4",
"TPMT": "*1/*3C",
"SNPs": {"rs12345": "AG", "rs67890": "CC"}
},
"clinical": {
"age": 58,
"weight": 70.5,
"height": 170,
"lab_values": {"creatinine": 1.2, "alt": 45, "ast": 38},
"comorbidities": ["hypertension", "diabetes"]
},
"imaging": {
"tumor_volume": 45.2,
"perfusion_rate": 0.85,
"texture_features": {"entropy": 5.2, "uniformity": 0.45}
}
}
Drug Profile (drug_profile.json)
{
"drug_name": "ExampleDrug",
"drug_class": "chemotherapy",
"metabolizing_enzymes": ["CYP2D6", "CYP3A4"],
"target_genes": ["EGFR", "KRAS"],
"pk_params": {
"clearance": 15.5,
"volume_distribution": 45.0,
"half_life": 8.0
},
"efficacy_biomarkers": ["tumor_reduction", "survival_rate"],
"toxicity_markers": ["neutropenia", "hepatotoxicity"]
}
Model Principles
- Genotype Modeling: Parse drug metabolizing enzyme genotypes to predict metabolic phenotypes (ultrarapid/normal/poor metabolizer)
- Physiological Modeling: Calculate personalized pharmacokinetic parameters based on age, weight, and organ function
- Imaging Modeling: Extract tumor features to predict drug responsiveness
- Integrated Model: Multi-modal data fusion to build a comprehensive digital twin
- Drug Simulation: PBPK (physiologically-based pharmacokinetics) + PD (pharmacodynamics) model
References
- PBPK modeling guidelines (FDA, 2018)
- Pharmacogenomics in precision medicine (Nature Reviews, 2020)
Risk Assessment
| Risk Indicator | Assessment | Level |
|---|---|---|
| Code Execution | Python scripts with tools | High |
| Network Access | External API calls | High |
| File System Access | Read/write data | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Data handled securely | Medium |
Security Checklist
- No hardcoded credentials or API keys
- No unauthorized file system access (../)
- Output does not expose sensitive information
- Prompt injection protections in place
- API requests use HTTPS only
- Input validated against allowed patterns
- API timeout and retry mechanisms implemented
- Output directory restricted to workspace
- Script execution in sandboxed environment
- Error messages sanitized (no internal paths exposed)
- Dependencies audited
- No exposure of internal service architecture
Prerequisites
# Python dependencies
pip install -r requirements.txt
Evaluation Criteria
Success Metrics
- Successfully executes main functionality
- Output meets quality standards
- Handles edge cases gracefully
- Performance is acceptable
Test Cases
- Basic Functionality: Standard input → Expected output
- Edge Case: Invalid input → Graceful error handling
- Performance: Large dataset → Acceptable processing time
Lifecycle Status
- Current Stage: Draft
- Next Review Date: 2026-03-06
- Known Issues: None
- Planned Improvements:
- Performance optimization
- Additional feature support
安全使用建议
This skill contains a local Python implementation for building and simulating digital-twin patients and does not declare any external network endpoints or credentials — but the documentation claims network/API behavior that the code does not show. Before installing or running: 1) Do a manual code review of scripts/main.py (and any truncated parts) to confirm there are no hidden network calls, subprocess.exec usage, or hardcoded endpoints. 2) Don't run with real patient data until you confirm storage, logging, and export behaviors and that data is handled per your privacy requirements (e.g., HIPAA). 3) Fix/verify code quality issues (I found at least one bug: calculate_toxicity_risk builds 'risks' but returns 'ris'). 4) Run the code in an isolated sandbox (no network access) for initial testing. 5) If you expect the skill to call external APIs, require the developer to document endpoints, auth, and TLS usage and to declare required env vars; otherwise treat the network/API claim as a documentation inconsistency. If you are not comfortable reviewing code, avoid installing this skill or ask the publisher for audited sources and a clear threat/privacy statement.
功能分析
Type: OpenClaw Skill
Name: digital-twin-patient-builder
Version: 0.1.0
The skill bundle provides a simulation environment for building 'digital twin' patient models to test drug efficacy and toxicity using mathematical models (PBPK/PD). The core logic in scripts/main.py is a well-structured implementation using standard scientific libraries like numpy to process local JSON data. No evidence of data exfiltration, malicious execution, or prompt injection was found; the 'High' risk level mentioned in SKILL.md appears to be a self-assessment of the tool's functional domain rather than an indicator of malicious intent.
能力评估
Purpose & Capability
Name/description promise: build digital-twin patients and simulate drug response — matched by the included Python implementation. However SKILL.md and metadata label the skill as 'Hybrid (Tool/Script + Network/API)' and list 'Network Access: External API calls' as a high risk, yet the code and manifest declare no network libraries, no endpoints, and no required credentials. This mismatch (claimed network/API behavior without any declared endpoints or env vars) is an incoherence that deserves review.
Instruction Scope
Runtime instructions are concrete: run scripts/main.py with patient and drug JSON inputs or call the Python API. Those instructions align with the stated purpose (reading patient JSON, running local simulations). The SKILL.md also includes broad security checklist items (HTTPS, sandboxing, input validation) but does not specify how those protections are implemented; the instructions do not direct any external transmission of data.
Install Mechanism
No install spec is provided (instruction-only with bundled code). That keeps risk lower because nothing is downloaded at install time. The package includes requirements.txt (only basic/stdlib-like entries and numpy), and no external installers or arbitrary URLs are used.
Credentials
The skill requests no environment variables or credentials, which is proportionate to a purely local simulator. However the skill processes highly sensitive health/genomic data (patient genotype, labs, imaging). The package provides no explicit privacy/HIPAA controls, no logging policy, and no data encryption or storage guidance — a privacy concern even though no credentials are requested.
Persistence & Privilege
The skill does not request permanent 'always' inclusion and uses normal agent invocation flags. It does not declare modifications to other skills or system-wide settings. No persistence/privilege escalation indicators present in the manifest.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install digital-twin-patient-builder - 安装完成后,直接呼叫该 Skill 的名称或使用
/digital-twin-patient-builder触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of Digital Twin Patient Builder.
- Enables building of virtual patient models with genotype, clinical, and imaging data.
- Simulates drug efficacy, toxicity, and optimal dosing in a virtual environment.
- Provides command-line and Python API interfaces.
- Includes example input/output formats for patient and drug profiles.
- Incorporates modular architecture for genotype, clinical, imaging, and PK/PD simulation.
- Documentation outlines security, usage, and evaluation criteria.
元数据
常见问题
Digital Twin Patient Builder 是什么?
Build digital twin patient models to test drug efficacy and toxicity in virtual environments. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 228 次。
如何安装 Digital Twin Patient Builder?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install digital-twin-patient-builder」即可一键安装,无需额外配置。
Digital Twin Patient Builder 是免费的吗?
是的,Digital Twin Patient Builder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Digital Twin Patient Builder 支持哪些平台?
Digital Twin Patient Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Digital Twin Patient Builder?
由 AIpoch(@aipoch-ai)开发并维护,当前版本 v0.1.0。
推荐 Skills