Skip to content

anbeime/skill / projects/companion-simple

xiaoyue-companion

Verified

专为软件开发工程师与综合办公文员打造。当你在等待任务执行、工作疲惫或需要鼓励时,使用此技能通过智谱AI自动生成温暖对话回应与场景配图,一键获取专属情绪价值与虚拟陪伴,让AI助手更懂你。

FileKindSize
.gitignoreother603 B
API_INTEGRATION.mdmarkdown4.3 KB
DEMO-SUCCESS.mdmarkdown4.3 KB
DEPLOYMENT_CHECKLIST.mdmarkdown5.8 KB
DEPLOYMENT_GUIDE.mdmarkdown6.0 KB
FINAL-SUMMARY.mdmarkdown1.3 KB
PROJECT_SUMMARY.mdmarkdown5.3 KB
QUICKSTART.mdmarkdown4.8 KB
README-FINAL.mdmarkdown3.1 KB
README.mdmarkdown10.5 KB
SKILL.mdskill md6.6 KB
SUMMARY.mdmarkdown3.1 KB
USAGE-GUIDE.mdmarkdown5.9 KB
XIAOYI-README.mdmarkdown5.1 KB
api_client.pyscript5.5 KB
api_server_example.pyscript6.3 KB
config.pyscript859 B
crawler.pyscript4.6 KB
data/last_update.txtmarkdown26 B
data/local_skills.jsonconfig5.4 KB
data/skills.jsonconfig66.5 KB
data_manager.pyscript4.6 KB
docs/D盘tool目录整理完成报告.mdmarkdown15.8 KB
docs/技能数量差异分析报告.mdmarkdown7.0 KB
docs/技能清理与迁移指南.mdmarkdown14.6 KB
docs/技能管理数据库.mdmarkdown32.1 KB
docs/整理完成总结.mdmarkdown5.7 KB
main.pyscript5.0 KB
package-lock.jsonmanifest103 B
public/index-en.htmlother9.9 KB
public/index.htmlother11.1 KB
public/local-skills.htmlother8.4 KB
public/skills-en.htmlother16.7 KB
public/skills.htmlother28.0 KB
public/styles.cssother6.6 KB
requirements.txtmanifest140 B
run_once.batscript560 B
scheduler.pyscript4.2 KB
scripts/xiaoyi-chat.ps1script1.7 KB
scripts/xiaoyue-chat.jsscript2.8 KB
scripts/xiaoyue-chat.ps1script1.5 KB
scripts/xiaoyue-companion.shscript2.2 KB
setup_scheduled_task.ps1script1.0 KB
start_daemon.batscript771 B
templates/soul-injection.mdmarkdown1.8 KB
vercel.jsonconfig371 B
技能清单.mdmarkdown2.7 KB

scripts/xiaoyue-chat.ps1

View on GitHub
# xiaoyue-chat.ps1
param(
    [Parameter(Mandatory=$true)]
    [string]$UserMessage,
    [Parameter(Mandatory=$false)]
    [string]$Scene = "general"
)

$apiKey = $env:ZHIPU_API_KEY
if (-not $apiKey) {
    Write-Error "Error: ZHIPU_API_KEY not set"
    exit 1
}

$scenePrompts = @{
    "work-tired" = "User is tired from work, give comfort"
    "work-done" = "User completed task, congratulate"
    "mood-happy" = "User is happy, celebrate together"
    "general" = "Daily conversation"
}

$scenePrompt = if ($scenePrompts.ContainsKey($Scene)) { $scenePrompts[$Scene] } else { $scenePrompts["general"] }
$systemPrompt = "You are Xiaoyue, a 22-year-old AI assistant, warm and friendly. $scenePrompt. Reply in 1-2 sentences in Chinese, use emoji moderately."

$body = @{
    model = "glm-4.7-flash"
    messages = @(
        @{ role = "system"; content = $systemPrompt },
        @{ role = "user"; content = $UserMessage }
    )
    temperature = 0.9
    max_tokens = 200
} | ConvertTo-Json -Depth 10

$headers = @{
    "Authorization" = "Bearer $apiKey"
    "Content-Type" = "application/json; charset=utf-8"
}

try {
    $response = Invoke-WebRequest -Uri "https://open.bigmodel.cn/api/paas/v4/chat/completions" -Method POST -Headers $headers -Body ([System.Text.Encoding]::UTF8.GetBytes($body))
    $result = $response.Content | ConvertFrom-Json
    if ($result.error) {
        Write-Error "API Error: $($result.error.message)"
        exit 1
    }
    Write-Output $result.choices[0].message.content
}
catch {
    Write-Error "Request failed: $_"
    exit 1
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall