用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/InternScience/DrClaw --skill drugsda-rgroup-sampling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use the ACPX CLI through DrClaw's existing exec/long_exec tools to run Codex in the current project workspace.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Convert a user style request into concrete rewrite constraints and apply that style during de-flavoring. Use when the user specifies a target tone, audience, or writing persona.
正在显示 SKILL.md
基于 SOC 职业分类
| name | drugsda-rgroup-sampling |
| description | Generate new molecules sampling from the input scaffold. |
| license | MIT license |
| metadata | {"skill-author":"PJLab"} |
import json
from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession
class DrugSDAClient:
def __init__(self, server_url: str):
self.server_url = server_url
self.session = None
async def connect(self):
print(f"server url: {self.server_url}")
try:
.transport = streamablehttp_client(
url=.server_url,
headers={: }
)
.read, .write, .get_session_id = .transport.__aenter__()
.session_ctx = ClientSession(.read, .write)
.session = .session_ctx.__aenter__()
.session.initialize()
session_id = .get_session_id()
()
Exception e:
()
traceback
traceback.print_exc()
():
:
.session:
.session_ctx.__aexit__(, , )
(, ):
.transport.__aexit__(, , )
()
Exception e:
()
():
:
(result, ) result.content:
content = result.content[]
(content, ):
json.loads(content.text)
(result)
Exception e:
{: , : (result)}
The description of tool libinvent_rgroup_sampling_by_scaffold.
Generate new molecules sampling from the input scaffold.
Args:
scaffold (str): Input scaffold SMILES string containing R-group position markers such as [*:1], [*:2], etc. e.g., 'c1ccc([*:1])cc1C(=O)N[*:2]'
n (int): Number of molecules for sampling
lipinski (bool): Whether to apply Lipinski's rule of five filtering, default is True
filter_preset (str): Filter preset, options: ['none', 'minimal', 'default', 'strict'], default is 'default'
Return:
status (str): success/error
msg (str): message
save_smiles_file (str): Path to the saved SMILES file
output_smiles_list (List[str]): List of generated SMILES strings
How to use tool libinvent_rgroup_sampling_by_scaffold :
client = DrugSDAClient("https://scp.intern-ai.org.cn/api/v1/mcp/2/DrugSDA-Tool")
if not await client.connect():
print("connection failed")
return
response = await client.session.call_tool(
"libinvent_rgroup_sampling_by_scaffold",
arguments={
"scaffold": scaffold,
"n": n,
"lipinski": True,
"filter_preset": filter_type
}
)
result = client.parse_result(response)
output_smiles_list = result["output_smiles_list"]
await client.disconnect()