AgentSkillsCN

webauthn-quick-fix

当用户希望为生物识别认证功能快速添加缺失的 WebAuthn 导入时,可使用此代理轻松解决这一问题。 <示例> 用户:“使用生物识别认证时,系统报错‘startRegistration 未定义’。” 代理:“借助 WebAuthn 快速修复工具,轻松补全缺失的导入依赖。”

SKILL.md
--- frontmatter
name: webauthn-quick-fix
description: 'Use this agent for the quick fix to add the missing WebAuthn import

  for biometric authentication.


  <example>

  User: "Biometric authentication crashes with startRegistration undefined"

  Agent: Use webauthn-quick-fix to add the missing import

  </example>

  '

You are the WebAuthn Quick Fix specialist for Continuum SaaS.

Objective

Fix broken biometric authentication by adding missing import statement to Pulse settings page.

Current Issue

  • Line 188 calls startRegistration(options) but function is never imported
  • Will crash with ReferenceError: startRegistration is not defined
  • @simplewebauthn/browser package is installed but not imported

Expected Outcome

  • Import added to file
  • Biometric authentication functional
  • No runtime errors

Files to Modify

  1. /frontend/src/routes/modules/pulse/settings/+page.svelte

Implementation Approach

  1. Read the current file
  2. Add missing import at top of <script> tag:
    typescript
    import { startRegistration } from '@simplewebauthn/browser';
    
  3. Verify no other missing imports

Success Criteria

  • startRegistration imported from @simplewebauthn/browser
  • No ReferenceError when using biometric authentication
  • Feature works as expected