A specialized assistant for RFD3 (RFdiffusion3) usage, providing guidance and support for protein design workflows.
This repository provides context files, agent scripts, and knowledge packs that make GenAI tooling significantly more useful for RFD3 (RFdiffusion3) workflows. It is now available as a Trae skill for enhanced integration with the Trae IDE.
It is maintained as a specialized assistant for RFD3 usage, providing focused guidance and support for protein design workflows.
The key goals of this package are:
- Help researchers get productive with RFD3 (RFdiffusion3) quickly
- Provide reusable context, scripts, and rules for RFD3 workflows
- Simplify the use of RFD3 for protein design tasks
- Integrate seamlessly with Trae IDE for enhanced user experience
rfd3ass/
├── scripts/ # Agent scripts (.script.md)
├── knowledge/ # RFD3-specific knowledge files
└── README.md # Documentation
.trae/skills/rfd3ass/
├── SKILL.md # Skill definition and usage
├── config.json # Skill configuration
└── index.js # Skill implementation
- Trae IDE
- Node.js (for running the skill)
- Python (for knowledge management modules)
-
Clone the repository (if not already done):
git clone <repository-url> cd rfd3ass
-
Install dependencies:
# For Node.js dependencies npm install # For Python dependencies pip install -r requirements.txt
-
Configure the skill: The skill is automatically detected by Trae when placed in the
.trae/skills/directory.
Edit .trae/skills/rfd3ass/config.json to customize skill settings:
{
"config": {
"directories": {
"scripts": "../../rfd3ass/scripts",
"knowledge": "../../rfd3ass/knowledge"
},
"commands": {
"run": {
"description": "Run a script",
"usage": "run <script-name>",
"handler": "run_script"
}
}
}
}list scripts
run <script-name>
list knowledge
search knowledge <query>
- pdd – Prompt-Driven Development
- code-assist – Coding + TDD assistant
- technical-design-document-generator – Design doc generator
- debug-service-issues – Production debugging
Teams can add domain knowledge under knowledge/ and the skill will automatically consume it. Knowledge files can be in Markdown (.md), JSON (.json), or YAML (.yaml/.yml) format.
- Create a new file in the
knowledge/directory - Use clear and descriptive naming conventions
- Include relevant metadata (for Markdown files, use YAML front matter)
- Organize content with logical headings
---
title: AWS Lambda Best Practices
author: txtpower community
created: 2024-01-01
updated: 2024-01-02
tags:
- aws
- lambda
- best-practices
---
# AWS Lambda Best Practices
## Overview
This document provides best practices for working with AWS Lambda functions...- Create a new
.script.mdfile in thescripts/directory - Follow the script format used in existing scripts
- Test the script before sharing it with the team
- Create a new knowledge file in the
knowledge/directory - Use appropriate format (Markdown, JSON, or YAML)
- Organize content logically with clear headings
- Issue:
Script not found: <script-name> - Solution: Check that the script file exists in the
scripts/directory with the correct.script.mdextension
- Issue:
Knowledge directory not found - Solution: Check that the
knowledge/directory exists and contains knowledge files
Skill execution logs are available in the Trae IDE console. For more detailed logs, check the Trae IDE's developer console.
Community-driven experimentation → standardization.
This package is maintained by the txtpower community, and we welcome contributions and feedback. Together, we can make GenAI tooling more effective for all developers.
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Please ensure your contributions follow the existing code style and documentation conventions.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please contact the txtpower community.
RFD3 智能代理是一个基于 Trae 原生能力实现的智能助手,用于回答关于 RFD3 (RFdiffusion3) 的使用问题。它利用 Trae 的内置搜索和 AI 能力,无需部署额外模型,即可为用户提供关于 RFD3 的详细使用指导。
当其他人使用这个技能时,需要修改 .trae/skills/rfd3ass 中的路径配置,以确保技能能够正确访问相关目录和 Foundry 项目。
.trae/skills/rfd3ass/config.json
此文件包含技能的配置信息,包括目录路径和命令定义。
-
脚本和知识库路径
如果
rfd3ass目录的位置发生变化,需要修改以下路径:"config": { "directories": { "scripts": "../../rfd3ass/scripts", // 脚本目录路径 "knowledge": "../../rfd3ass/knowledge", // 知识库目录路径 "foundry": "C:\\Users\\XXX\\foundry" // Foundry 项目路径 } }
-
Foundry 项目路径
这是最重要的修改项,需要将 Foundry 项目路径修改为您本地的 Foundry 项目路径:
"foundry": "C:\\Users\\your-username\\foundry" // 修改为您的 Foundry 项目路径
修改前:
"config": {
"directories": {
"scripts": "../../rfd3ass/scripts",
"knowledge": "../../rfd3ass/knowledge",
"foundry": "C:\\Users\\XXX\\foundry"
}
}修改后:
"config": {
"directories": {
"scripts": "../../rfd3ass/scripts", // 保持相对路径不变
"knowledge": "../../rfd3ass/knowledge", // 保持相对路径不变
"foundry": "C:\\Users\\john\\foundry" // 修改为新的 Foundry 路径
}
}修改路径配置后,可以使用以下命令验证配置是否正确:
list knowledge
如果命令成功执行并列出知识库文件,则说明路径配置正确。
- 确保
rfd3ass/scripts/目录存在 - 创建
rfd3-agent.script.md文件,内容如下:
# RFD3 使用智能代理(Trae 原生版)
## 目的
此脚本创建一个智能代理,利用 Trae 内置能力回答关于 RFD3 (RFdiffusion3) 的使用问题,无需部署额外模型。
## 工作流程
### 步骤 1:接收用户问题用户问题: <user_question>
### 步骤 2:搜索知识库
使用 Trae 命令搜索知识库: search knowledge <user_question>
### 步骤 3:生成回答
基于搜索结果,生成对用户问题的详细回答: <user_question> <search_results>
### 步骤 4:处理后续追问
如果用户有后续追问,基于之前的对话生成回答: <follow_up_question> <previous_dialog> </previous_dialog>
## 使用示例
### 示例 1:安装问题
用户问题:如何安装 RFD3?
使用 Trae 命令搜索知识库: search knowledge 安装 RFD3
基于搜索结果,生成对用户问题的详细回答: 如何安装 RFD3? [搜索结果中的相关内容]
### 示例 2:使用 RFD3 问题
用户问题:如何使用 RFD3 运行推理?
使用 Trae 命令搜索知识库: search knowledge RFD3 运行推理
基于搜索结果,生成对用户问题的详细回答: 如何使用 RFD3 运行推理? [搜索结果中的相关内容]
- 打开
.trae/skills/rfd3ass/config.json文件 - 在
commands部分添加rfd3命令配置:
"rfd3": {
"description": "Ask RFD3 usage questions",
"usage": "rfd3 <question>",
"handler": "handle_rfd3_agent"
}- 打开
.trae/skills/rfd3ass/index.js文件 - 添加
handleRfd3Agent函数和generateRfd3Response函数:
// 添加 RFD3 Agent 命令处理
function handleRfd3Agent(args) {
const userQuestion = args.join(' ');
console.log(`Processing RFD3 agent query: ${userQuestion}`);
// 1. 搜索知识库(使用 Trae 内置的搜索能力)
const searchResults = searchKnowledge(userQuestion);
// 2. 提取相关信息
let retrievedInformation = '';
if (searchResults.success && searchResults.results) {
searchResults.results.forEach(result => {
retrievedInformation += `\n---\n**${result.path}**\n${result.preview}`;
});
}
// 3. 生成回答(利用 Trae 内置的 AI 能力)
const response = generateRfd3Response(userQuestion, retrievedInformation);
return {
success: true,
message: `RFD3 agent response for: ${userQuestion}`,
response: response,
retrieved_information: retrievedInformation
};
}
// 生成 RFD3 相关回答
function generateRfd3Response(question, information) {
if (!information) {
return `抱歉,我在知识库中没有找到与"${question}"相关的信息。请尝试更具体的问题,或检查知识库内容是否完整。`;
}
// 利用 Trae 内置的 AI 能力生成回答
// 这里直接基于检索到的信息构建回答,无需外部模型
return `基于 RFD3 知识库的信息,对您的问题"${question}"的回答如下:\n\n${information}\n\n希望这个回答对您有帮助!如果您有其他问题,请随时提问。`;
}- 在
handleCommand函数中添加对rfd3命令的处理:
case 'rfd3':
return handleRfd3Agent(args);- 在
module.exports中导出handleRfd3Agent函数:
module.exports = {
handleCommand,
initialize,
runScript,
listResources,
searchKnowledge,
handleRfd3Agent
};在 Trae IDE 中,您可以使用以下命令向 RFD3 智能代理提问:
rfd3 <问题>
示例 1:安装问题
rfd3 如何安装 RFD3?
示例 2:使用 RFD3 问题
rfd3 如何使用 RFD3 运行推理?
示例 3:下载模型权重问题
rfd3 如何下载 RFD3 模型权重?
RFD3 智能代理使用以下知识库文件提供回答:
rfd3_overview.md– RFD3 项目概述rfd3_usage.md– RFD3 使用指南rfd3_parameters.md– RFD3 参数说明rfd3_examples.md– RFD3 使用示例
- 在
rfd3ass/knowledge/目录中创建新的 Markdown 文件 - 按照现有知识库文件的格式组织内容,重点关注 RFD3 的使用方法和参数
- 保存文件后,Trae 智能代理会自动使用新的知识库内容
问题:Error: Unknown command: rfd3
解决方案:检查 config.json 文件中是否正确配置了 rfd3 命令
问题:RFD3 agent response: 抱歉,我在知识库中没有找到与"..."相关的信息
解决方案:检查知识库文件是否存在,以及文件内容是否包含相关信息
问题:技能未初始化
解决方案:检查 index.js 文件是否正确实现了 initialize 函数,以及依赖项是否已安装
RFD3 智能代理基于 Trae 原生能力实现,主要包括:
- 知识库搜索:使用 Trae 的内置搜索能力,在
rfd3ass/knowledge/目录中搜索相关信息 - 回答生成:利用 Trae 的内置 AI 能力,基于搜索到的信息生成详细回答
- 命令处理:通过
handleRfd3Agent函数处理用户的rfd3命令请求
整个实现无需部署额外模型,完全基于 Trae 内置能力,确保了使用的便捷性和可靠性。