rag — community AutoRegMonkey, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Econometrics Analysis Agents requiring instant access to Bruce Hansen's authoritative textbook knowledge. AutoRegMonkey,实证机器人

rukikotoo rukikotoo
[6]
[1]
Updated: 12/10/2025

Agent Capability Analysis

The rag skill by rukikotoo is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Econometrics Analysis Agents requiring instant access to Bruce Hansen's authoritative textbook knowledge.

Core Value

Enables direct querying of a specialized FAISS vector database containing Bruce Hansen's econometrics materials, providing agents with precise textbook references and technical explanations. The skill handles UTF-8 encoding configuration and integrates seamlessly with Python environments through dedicated rag_query modules.

Capabilities Granted for rag

Retrieving specific econometric formulas and theorems
Analyzing statistical methodologies from authoritative sources
Generating textbook-accurate explanations for complex concepts

! Prerequisites & Limits

  • Requires local FAISS database at specified Windows path
  • Dependent on Python environment with proper sys.path configuration
  • Limited to econometrics content from Bruce Hansen's materials only
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

rag

Install rag, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

RAG 查询技能

此技能允许代理查询计量经济学RAG知识库,该知识库基于Bruce Hansen的计量经济学教材构建。

概述

  • 数据库类型: FAISS 向量数据库
  • 数据库位置: D:\AutoRegMonkey\database\rag_db\

使用方法

当用户输入以"rag:"开头时,执行以下步骤:

  1. 提取查询问题: 识别"rag:"后面的查询文本
  2. 调用Python脚本: 使用用户的Python环境执行RAG查询
  3. 返回结果: 将查询结果格式化后呈现给用户

Python 脚本模板

强制Python I/O用UTF-8:sys.stdout.reconfigure(encoding='utf-8') 和 sys.stderr.reconfigure(encoding='utf-8') 使用以下Python代码进行查询:

python
1import sys 2sys.path.append(r"D:\AutoRegMonkey\database") 3from rag_query import EconometricsRAG 4sys.stdout.reconfigure(encoding='utf-8') 5sys.stderr.reconfigure(encoding='utf-8') 6 7# 初始化RAG 8rag = EconometricsRAG() 9 10# 执行查询(从用户输入中提取的问题) 11results = rag.query("用户的问题", n_results=5) 12 13# 处理并输出结果 14output_lines = [] 15for i, r in enumerate(results): 16 chunk = r['chunk'] 17 score = r['score'] 18 output_lines.append(f"【结果 {i+1}】 - 来源: 第{chunk['page']}页, 相似度: {score:.4f}") 19 output_lines.append(f"{chunk['text'][:500]}{'...' if len(chunk['text']) > 500 else ''}") 20 output_lines.append("---") 21 22print("\n".join(output_lines))

通过Bash执行

在Bash工具中使用以下命令:

bash
1"C:\Users\29165\anaconda3\python.exe" -c " 2import sys 3sys.path.append(r'D:\AutoRegMonkey\database') 4from rag_query import EconometricsRAG 5 6rag = EconometricsRAG() 7results = rag.query('用户的问题', n_results=5) 8 9for i, r in enumerate(results): 10 chunk = r['chunk'] 11 score = r['score'] 12 print(f'【结果 {i+1}】 - 来源: 第{chunk[\"page\"]}页, 相似度: {score:.4f}') 13 print(f'{chunk[\"text\"][:500]}{\"...\" if len(chunk[\"text\"]) > 500 else \"\"}') 14 print('---') 15"

注意:将'用户的问题'替换为实际查询文本。

查询示例

示例1: 基础查询

用户输入: rag:什么是OLS回归?

执行代码:

bash
1"C:\Users\29165\anaconda3\python.exe" -c " 2import sys 3sys.path.append(r'D:\AutoRegMonkey\database') 4from rag_query import EconometricsRAG 5 6rag = EconometricsRAG() 7results = rag.query('什么是OLS回归?', n_results=5) 8 9for i, r in enumerate(results): 10 chunk = r['chunk'] 11 score = r['score'] 12 print(f'【结果 {i+1}】 - 来源: 第{chunk[\"page\"]}页, 相似度: {score:.4f}') 13 print(f'{chunk[\"text\"][:500]}{\"...\" if len(chunk[\"text\"]) > 500 else \"\"}') 14 print('---') 15"

示例2: 获取LLM上下文

如果需要在其他分析中使用RAG上下文,可以使用get_context()方法:

python
1context = rag.get_context("heteroskedasticity robust standard errors", n_results=3) 2print(context)

示例3: 按页码搜索

python
1chunks = rag.search_by_page(page_number=100) 2for chunk in chunks: 3 print(f"第{chunk['page']}页: {chunk['text'][:200]}")

文件组织

  • 原始数据: D:\AutoRegMonkey\database\rag_db\ (FAISS索引和文档块)
  • 查询接口: D:\AutoRegMonkey\database\rag_query.py
  • API文档: D:\AutoRegMonkey\database\RAG_API_说明.md

注意事项

  1. Python环境: 使用用户的Anaconda Python环境 (C:\Users\29165\anaconda3\python.exe)
  2. 路径引用: 确保正确引用包含空格或特殊字符的路径
  3. 结果数量: 默认返回5个最相关结果,可根据需要调整n_results参数
  4. 输出格式: 保持输出整洁,限制文本长度以便阅读
  5. 错误处理: 如果查询失败,检查数据库路径和Python模块导入

高级用法

与其他技能结合

此技能可与autoregmonkey技能结合使用,在计量经济学分析过程中实时查询相关知识:

  1. 用户输入以"autoregmonkey:"开头的计量任务
  2. 在分析过程中,使用RAG技能查询相关计量理论
  3. 将查询结果融入分析报告

批量查询

对于复杂问题,可执行多次查询以获取全面信息:

python
1queries = ["OLS regression", "heteroskedasticity", "instrumental variables"] 2for q in queries: 3 results = rag.query(q, n_results=2) 4 # 处理结果...

故障排除

  • 导入错误: 确保sys.path.append(r'D:\AutoRegMonkey\database')已添加
  • 模块未找到: 检查rag_query.py文件是否存在
  • 数据库错误: 确认D:\AutoRegMonkey\database\rag_db\目录包含必要文件
  • 编码问题: 使用encoding='utf-8'处理中英文文本

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is rag?

Ideal for Econometrics Analysis Agents requiring instant access to Bruce Hansen's authoritative textbook knowledge. AutoRegMonkey,实证机器人

How do I install rag?

Run the command: npx killer-skills add rukikotoo/AutoRegMonkey/rag. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for rag?

Key use cases include: Retrieving specific econometric formulas and theorems, Analyzing statistical methodologies from authoritative sources, Generating textbook-accurate explanations for complex concepts.

Which IDEs are compatible with rag?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for rag?

Requires local FAISS database at specified Windows path. Dependent on Python environment with proper sys.path configuration. Limited to econometrics content from Bruce Hansen's materials only.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add rukikotoo/AutoRegMonkey/rag. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use rag immediately in the current project.

Related Skills

Looking for an alternative to rag or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI