Index of every page on this site: llms.txt
All skills
ki2pixel avatar

/magic-link-auth-companion

@7f1d5e7
Run it yourself

Manage MagicLinkService changes across backend, storage (Redis/external), and dashboard UI while enforcing security, TTL, and revocation requirements.

Use this Skill: https://skilld.dev/gh/ki2pixel/render_signal_server/magic-link-auth-companion

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈44 tokens for metadata: the name and description. ≈708 when used: this file.

Description uses 2.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈178 characters, or 2.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Magic Link Auth Companion

Quand utiliser ce skill

  • Modifications de services/magic_link_service.py
  • API /api/auth/magic-link
  • UI login.html, dashboard.html, static/dashboard.js
  • Stockage Redis ou backend externe (config_api.php)

Pré-requis

  • ENV obligatoires : FLASK_SECRET_KEY.
  • ENV recommandées : MAGIC_LINK_TTL_SECONDS pour piloter la durée de vie; MAGIC_LINK_TOKENS_FILE reste optionnelle car config/settings.py fournit un fallback par défaut.
  • ENV optionnelles (mode backend externe) : EXTERNAL_CONFIG_BASE_URL, CONFIG_API_TOKEN.
  • Virtualenv /mnt/venv_ext4/venv_render_signal_server pour les scripts.
  • Accès Redis ou backend externe fonctionnel.

Workflow

  1. Sécurité & ENV
    • Vérifier les ENV ci-dessus.
    • Interdire toute journalisation des tokens (utiliser mask_sensitive_data).
  2. Service Python
    • Garder le pattern singleton + RLock.
    • Assurer la signature HMAC SHA-256, TTL configurable (MAGIC_LINK_TTL_SECONDS).
    • Pour les liens illimités (unlimited=True côté API/UI), exiger révocation explicite.
  3. Stockage
    • Redis-first : via app_config_store.
    • Backend externe : endpoints GET/POST magic_link_tokens (PHP). Toujours vérifier les codes de retour et valider le JSON.
  4. Routes & UI
    • API : réponses JSON {success, magic_link, expires_at, unlimited}.
    • UI : respecter les toasts (MessageHelper), showCopiedFeedback, états disabled pendant l'appel.
    • Ajouter les boutons/options (illimité, TTL custom éventuel) dans des panneaux accessibles, sans casser le flux actuel generateMagicLink() de static/dashboard.js.
  5. Tests
    • pytest tests/test_services.py -k magic_link pour couvrir le service actuel.
    • Compléter tests/test_api_auth.py ou ajouter un fichier dédié si la surface API /api/auth/magic-link s'élargit.
    • QA manuelle : génération one-shot, permanent, révocation.
  6. Documentation & Memory Bank
    • Mettre à jour docs/access/authentication.md (section Magic Links) ou section correspondante.
    • Consigner toute nouvelle option de sécurité dans la Memory Bank.
  7. Revocation (urgence)
    • Utiliser le helper python ./.agents/skills/magic-link-auth-companion/revoke_magic_links.py --all ou python ./.agents/skills/magic-link-auth-companion/revoke_magic_links.py --token <uuid> pour révoquer en masse ou individuellement.

Ressources

  • revoke_magic_links.py : script CLI pour révoquer tous les tokens (--all) ou un token spécifique (--token <uuid>).

Conseils

  • Utiliser des UUID v4 pour les tokens et vérifier les collisions.
  • Nettoyer les tokens expirés régulièrement (ex: au démarrage et après chaque génération).
  • Lors d'une compromission, fournir un script de révocation de masse (via set_config_json).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings8mo4 checks · Risk SAFE
  • Gen Agent Trust Hub8mo

    The skill manages magic link authentication and includes security best practices like token masking and HMAC signing. It utilizes an external backend for token storage and provides a Python script for manual token revocation. A low-risk surface for indirect prompt injection is noted due to the processing of data from external APIs.

  • Socket8mo

    1 alert: gptAnomaly

  • Snyk8mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/2 files flagged

Signed by skilld at 7f1d5e7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 9 months ago

README badge

README badge for ki2pixel/render_signal_server/magic-link-auth-companion