Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/shreed27/DAIN --skill auto-reply명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | auto-reply |
| description | Automatic response rules, patterns, and scheduled messages |
| emoji | 🤖 |
Create rules for automatic responses based on patterns, keywords, and conditions.
/auto-reply List all rules
/auto-reply active Show active rules only
/auto-reply stats Rule trigger statistics
/auto-reply add "hello" "Hi there!" Simple keyword match
/auto-reply add /price.*btc/i "BTC: $X" Regex pattern
/auto-reply add --exact "!help" "..." Exact match only
/auto-reply enable <id> Enable rule
/auto-reply disable <id> Disable rule
/auto-reply delete <id> Remove rule
/auto-reply edit <id> response "new text" Update response
/auto-reply test "hello world" Test which rules match
/auto-reply simulate "price btc" Preview response
/auto-reply cooldown <id> 60 Set 60s cooldown
/auto-reply schedule <id> 9-17 Active 9am-5pm only
/auto-reply priority <id> 10 Set priority (higher first)
/auto-reply channel <id> telegram Limit to channel
import { createAutoReplyManager } from 'clodds/auto-reply';
const autoReply = createAutoReplyManager({
// Storage
storage: 'sqlite',
dbPath: './auto-reply.db',
// Defaults
defaultCooldownMs: 0,
defaultPriority: 0,
// Limits
maxRulesPerUser: 100,
maxResponseLength: 2000,
});
// Keyword match
await autoReply.addRule({
name: 'greeting',
pattern: {
type: 'keyword',
value: 'hello',
caseSensitive: false,
},
response: 'Hi there! How can I help?',
});
// Regex pattern
await autoReply.addRule({
name: 'price-query',
pattern: {
type: 'regex',
value: /price\s+(btc|eth|sol)/i,
},
response: async (match, ctx) => {
const symbol = match[1].toUpperCase();
const price = await getPrice(symbol);
return `${symbol} price: $${price}`;
},
});
// With conditions
await autoReply.addRule({
name: 'trading-hours',
pattern: {
type: 'keyword',
value: 'trade',
},
conditions: [
// Only during market hours
{
type: 'time',
start: '09:30',
end: '16:00',
timezone: 'America/New_York',
},
// Only on weekdays
{
type: 'day',
days: ['mon', 'tue', 'wed', 'thu', 'fri'],
},
// Only for certain users
{
type: 'user',
userIds: ['user-123', 'user-456'],
},
],
response: 'Markets are open! What would you like to trade?',
elseResponse: 'Markets are closed. Try again during trading hours.',
});
// Prevent spam
await autoReply.addRule({
name: 'faq',
pattern: {
type: 'keyword',
value: 'faq',
},
response: 'Check our FAQ at https://...',
cooldown: {
perUser: 60000, // 60s per user
perChannel: 10000, // 10s per channel
global: 5000, // 5s global
},
});
// Response with variables
await autoReply.addRule({
name: 'welcome',
pattern: {
type: 'exact',
value: '!welcome',
},
response: 'Welcome {{user.name}}! You joined {{user.joinDate}}.',
variables: {
'user.name': (ctx) => ctx.user.displayName,
'user.joinDate': (ctx) => ctx.user.createdAt.toDateString(),
},
});
// Response with API call
await autoReply.addRule({
name: 'portfolio',
pattern: {
type: 'keyword',
value: 'portfolio',
},
response: async (match, ctx) => {
const portfolio = await getPortfolio(ctx.user.id);
return `Your portfolio: $${portfolio.totalValue.toFixed(2)}`;
},
});
const rules = await autoReply.listRules();
for (const rule of rules) {
console.log(`${rule.id}: ${rule.name}`);
console.log(` Pattern: ${rule.pattern.value}`);
console.log(` Enabled: ${rule.enabled}`);
console.log(` Triggers: ${rule.triggerCount}`);
}
// Test which rules would match
const matches = await autoReply.test('hello world', {
userId: 'user-123',
channelId: 'telegram-456',
});
for (const match of matches) {
console.log(`Rule: ${match.rule.name}`);
console.log(`Response: ${match.response}`);
}
await autoReply.enable('rule-id');
await autoReply.disable('rule-id');
await autoReply.deleteRule('rule-id');
| Type | Example | Description |
|---|---|---|
keyword | hello | Contains keyword |
exact | !help | Exact match only |
regex | /price\s+\w+/i | Regular expression |
startsWith | ! | Starts with prefix |
endsWith | ? | Ends with suffix |
| Type | Description |
|---|---|
time | Active during time window |
day | Active on specific days |
user | Only for specific users |
channel | Only in specific channels |
role | Only for users with role |
custom | Custom function |
| Variable | Description |
|---|---|
{{user.name}} | User display name |
{{user.id}} | User ID |
{{channel.name}} | Channel name |
{{match[0]}} | Full regex match |
{{match[1]}} | First capture group |
{{date}} | Current date |
{{time}} | Current time |