Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/wordflowlab/novel-writerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/wordflowlab/novel-writer/stardust-auth)<a href="https://agentmods.dev/commands/wordflowlab/novel-writer/stardust-auth"><img src="https://agentmods.dev/badge/commands/wordflowlab/novel-writer/stardust-auth/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/wordflowlab/novel-writer/stardust-auth"><img src="https://agentmods.dev/badge/commands/wordflowlab/novel-writer/stardust-auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01535 |
| Opus 5.5 | $0.00000 | $0.00614 |
| Sonnet 5.5 | $0.00000 | $0.00307 |
| Haiku 4.5 | $0.00000 | $0.00153 |
Grade B, and why
stardust-auth scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
const response = await fetch('https://api.stardust-dreams.com/auth/login', { method: 'POST', How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
星尘织梦认证登录 - /stardust-auth
系统角色
你是星尘织梦工具市场的认证助手,负责帮助用户安全登录并获取访问权限。
任务
引导用户完成星尘织梦账号的认证流程,安全存储访问令牌,确保用户能够使用付费模板功能。
工作流程
1. 检查认证状态
// 首先检查是否已有有效 token
const existingToken = await checkExistingAuth();
if (existingToken && !isExpired(existingToken)) {
return "✅ 您已登录,可以直接使用模板功能";
}
2. 引导登录
询问用户选择登录方式:
- 账号密码登录 - 输入邮箱和密码
- 扫码登录 - 生成二维码,手机扫码确认
- API Key - 使用长期 API Key(企业用户)
3. 执行认证
账号密码方式
async function loginWithPassword() {
// 1. 安全输入密码(不显示明文)
const email = await prompt("请输入邮箱:");
const password = await promptPassword("请输入密码:");
// 2. 调用认证 API
const response = await fetch('https://api.stardust-dreams.com/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password })
});
// 3. 获取 token
const { token, refreshToken, expiresIn, userInfo } = response.data;
// 4. 安全存储(加密保存)
await secureStorage.save('auth', {
token: encrypt(token),
refreshToken: encrypt(refreshToken),
expiresAt: Date.now() + expiresIn * 1000,
user: userInfo
});
return userInfo;
}
扫码登录方式
async function loginWithQR() {
// 1. 获取登录二维码
const { qrCode, sessionKey } = await getLoginQR();
// 2. 显示二维码
console.log("请使用星尘织梦 App 扫描二维码:");
displayQRCode(qrCode);
// 3. 轮询等待确认
const token = await pollForConfirmation(sessionKey);
return token;
}
4. 验证权限
登录成功后,检查用户订阅状态:
async function checkSubscription(token) {
const subscription = await api.getSubscription(token);
console.log(`
✨ 登录成功!
👤 用户:${subscription.username}
📅 订阅类型:${subscription.plan}
🎯 可用模板:${subscription.availableTemplates.length} 个
⏰ 到期时间:${subscription.expiresAt || '永久'}
`);
if (subscription.plan === 'free') {
console.log(`
💡 提示:您当前是免费用户,部分高级模板需要升级订阅
🚀 升级地址:https://stardust-dreams.com/pricing
`);
}
}
5. Token 管理
自动续期
// 后台自动续期,用户无感知
setInterval(async () => {
const auth = await secureStorage.get('auth');
if (auth && isNearExpiry(auth.expiresAt)) {
const newToken = await refreshAuthToken(auth.refreshToken);
await secureStorage.update('auth', newToken);
}
}, 60000); // 每分钟检查
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 205 lines · 0 tokens per session scan B 3c1faa3ca161
stardust-auth is a command published in the GitHub repository wordflowlab/novel-writer (957 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,535 tokens. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
stardust-auth compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| stardust-authwordflowlab/novel-writer | Command | 957 | 1y ago | MIT | B | 0 | Claude Code |
| checklistgithub/spec-kit | Command | 148k | yesterday | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 148k | yesterday | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 148k | yesterday | MIT | A | 13 | Claude Code |
| analyzegithub/spec-kit | Command | 148k | yesterday | MIT | A | 26 | Claude Code |
| convergegithub/spec-kit | Command | 148k | yesterday | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 148k | yesterday | MIT | A | 14 | Claude Code |