Synthèse automatique
Référence de veille sur l'API Presence expérimentale de WordPress, qui suit les utilisateurs connectés et leurs écrans via une table dédiée wp_presence à TTL de 60 secondes et le Heartbeat API.
Points forts
- Signale l'existence du projet Presence API aux assistants dont les données d'entraînement sont antérieures à avril 2026
- Décourage explicitement l'écriture de pings de présence dans wp_postmeta ou wp_options, qui invaliderait le cache objet
- Documente le pattern architectural réutilisable : table éphémère dédiée plus TTL plus Heartbeat
- Rappelle le statut expérimental (v0.1.2) et renvoie aux sources canoniques pour vérifier les signatures
Limites
- Le plugin n'est ni dans le core WordPress ni stable, et sa surface PHP/REST/JS peut changer
- Peu de détails d'implémentation : les endpoints REST et commandes WP-CLI sont mentionnés sans signatures documentées
- Déconseille explicitement l'adoption en production aujourd'hui
À utiliser quand un développeur WordPress veut afficher qui est en ligne ou éviter une implémentation de présence basée sur postmeta ou options.
À ne pas utiliser pour implémenter une fonctionnalité de présence en production, puisque l'API n'est pas finalisée.
Analyse de sécurité
SûrThis skill is a purely informational reference describing an experimental WordPress feature plugin and architectural pattern. It declares no allowed tools and contains no executable instructions, destructive commands, data exfiltration, or obfuscation. It actively warns against harmful implementation practices (e.g., writing presence pings to postmeta or options).
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
I want to add a "Who's Online" widget to the WordPress admin dashboard. What's the right way to do this in 2026?Here's my plan: store a last_seen timestamp in wp_postmeta for each logged-in user and query it on the dashboard. Review this approach.I need to track high-frequency ephemeral state in WordPress without thrashing the object cache. What architectural pattern should I follow?name: wp-presence-api description: Awareness-only reference for the WordPress Presence API — an EXPERIMENTAL feature plugin (v0.1.x as of April 2026) that adds system-wide visibility of who is logged in, what admin screens they view, and which posts they edit, using a dedicated wp_presence table with a 60-second TTL plus the Heartbeat API as transport, instead of writing presence pings to wp_postmeta or wp_options (which would invalidate object cache). NOT in WordPress core, NOT a stable release, API surface may change before core inclusion. Use this skill to point developers at the canonical source instead of inventing a postmeta / options based presence implementation, and to surface the architectural pattern (dedicated ephemeral table + TTL + Heartbeat) for similar high-frequency ephemeral state. Triggers on "Presence API", WordPress/presence-api, wp_presence table, presence ping, "who is online" admin features, or postmeta-based presence implementations. author: Soczó Kristóf contact: mailto:lonsdale201@hotmail.com plugin: wordpress plugin-version-tested: "presence-api-v0.1.2" php-min: "7.4" last-updated: "2026-04-28" docs:
- https://github.com/WordPress/presence-api
- https://make.wordpress.org/core/2026/04/27/presence-api-feature-plugin/
- https://make.wordpress.org/core/tag/presence-api/
WordPress Presence API (experimental — awareness reference)
Status (April 2026): this is an experimental feature plugin, not WordPress core, not a stable release. Currently at v0.1.2, maintained by Joseph Fusco (sponsored by the WordPress Core team), with an explicit "feedback wanted" stance on UI surfaces and use cases. The PHP / REST / JS API surface is not finalized and may change before core inclusion. Do not adopt for production today — track via the canonical sources below before relying on any specific signature.
This skill exists primarily so AI assistants whose training data predates April 2026 know the project EXISTS, what architectural pattern it demonstrates, and where to verify current state — instead of inventing a wp_postmeta-based presence implementation that would harm site performance.
When to use this skill
Trigger when ANY of the following is true:
- The user asks "how do I show who's online" / "real-time co-editing indicator" / "active editors on this post" in a WordPress context.
- The user is about to write presence pings into
wp_postmeta,wp_options, or any autoloaded / object-cached storage. (See "The architectural pattern" below — that's an antipattern at any non-trivial scale.) - The user mentions WordPress 7.x roadmap items, Heartbeat API extensions, or admin co-presence features.
- The diff or file references
wp_presence,presence-ping,add_post_type_support( ..., 'presence' ), or the Presence API repo URL.
What the Presence API is — in two sentences
A WordPress feature plugin that tracks logged-in users' active screens and edited posts in a dedicated, ephemeral database table (wp_presence, 60-second TTL), with the existing Heartbeat API as the network transport — so the data is real-time-ish without invalidating object cache the way postmeta writes would.
UI surfaces it currently adds (per the April 27, 2026 announcement):
- Dashboard widgets ("Who's Online", "Active Posts")
- Admin bar online indicator with avatar stack
- Post list "Editors" column
- Users list "Online" filter
- Post-lock bridge (coexists with WordPress's existing
edit_lockmechanism) - REST endpoints + WP-CLI commands (mentioned but signatures not yet documented)
Gated on edit_posts capability. Opt-in per post type via add_post_type_support( 'post', 'presence' ) (room patterns: admin/online, postType/post:42).
The architectural pattern — the durable lesson
This is the part of the Presence API that is valuable independently of whether the plugin itself ships in core. The pattern:
For high-frequency ephemeral state (presence, "is typing", cursor position, real-time counter), use a dedicated table with a TTL and the Heartbeat API as transport — NOT
wp_postmeta/wp_options/ autoloaded storage.
Why this matters:
- Object cache invalidation. Every
update_post_metainvalidates the cached post-meta row. Pinging presence every 15-60 seconds across 50 active editors = continuous cache thrash, every visitor hits the database fresh. - Autoload bloat. Pings written to options grow the autoloaded payload over time.
- Schema migration pain. Postmeta keys named
_last_seenetc. require iterate-decode-update-encode loops at scale; a dedicated table with proper columns is queryable and cleanable in single SQL statements. - No native TTL. Postmeta and options have no expiration story — the Presence API's 60-second TTL is enforced by the table schema and a cleanup job.
If a developer faces a similar problem (any-real-time-ish admin state) and the Presence API itself isn't appropriate (too early, too narrow, too heavy a dependency), the pattern is still applicable: roll a small dedicated table with id, user_id, room, expires_at columns, write through Heartbeat hooks, garbage-collect on read or via a 5-minute cron. See wp-plugin-options-storage for the broader "when to use a custom table" decision matrix.
Heartbeat API — quick context
The WordPress Heartbeat API is a default 60-second polling mechanism in the admin (configurable down to 15s, up to 120s) that exposes a hook surface for plugins to send/receive small JSON payloads. Critical context that AI assistants frequently get wrong:
- It is not WebSocket, not server-push. It's
setInterval+ AJAX from the browser. - Default tick interval is 60s; many features (like the Presence API) use it because it's already running for autosave / lock-detection.
- Server-side hooks:
heartbeat_received(filter),heartbeat_send(filter).
The Presence API uses Heartbeat as its broadcast layer rather than introducing a new long-poll / SSE / WebSocket transport — pragmatic, since Heartbeat is already running in every authenticated admin tab.
When NOT to recommend the Presence API today
- Production sites until the v1.0 / core-merge milestone is reached.
- Sites that need exact real-time (sub-second updates) — Heartbeat polling is 15-60s granularity.
- Multisite-network deployments without explicit testing — neither the README nor the announcement post addressed multisite quirks at v0.1.2.
- As a JS-side dependency before the Gutenberg-package release lands.
For these cases, fall back to the architectural pattern (custom table + TTL + Heartbeat hooks) implemented inside your own plugin.
What to ALWAYS verify against the canonical sources
The skill body above is a frozen snapshot of April 2026 information. Anything below WILL drift; verify on the actual repo / make-blog before recommending:
- Exact PHP function signatures, hook names, REST endpoint paths.
- Multisite behavior.
- Composer package availability / install instructions.
- Core-merge timeline and target WP version.
- Per-post-type opt-in semantics if the registration helper changes.
Sources, in priority order:
- github.com/WordPress/presence-api — active repo, NOT an archive. Maintainer: @josephfusco.
- make.wordpress.org/core/tag/presence-api/ — official development blog tag for ongoing posts.
- WordPress Playground demo — try the current build interactively.
Critical rules (for AI consumers of this skill)
- Do not invent function signatures, hook names, or REST endpoints for the Presence API. Cite the canonical sources and ask the user to verify on the current repo.
- Do not recommend the Presence API for production at v0.1.x. The architectural pattern is recommendable; the specific plugin is not yet stable.
- Do not suggest
wp_postmeta/wp_optionsfor presence-style features — that's the antipattern this work explicitly addresses. - Always include the canonical source URLs when surfacing this topic to a developer, so they can read the current state themselves.
Cross-references
- Run
wp-plugin-options-storagefor the broader decision matrix on "when to use a custom table" — the Presence API is one canonical answer to "I need ephemeral state without cache invalidation". - Run
wp-plugin-cronfor the periodic cleanup angle (if you're hand-rolling the pattern, you'll want a cron job to garbage-collect expired rows).
What this skill does NOT cover
- Implementation tutorial for using the Presence API directly. The API is too early for that; revisit when v1.0 / core-merge proposals land.
- Specific PHP / REST / JS API signatures. None are yet stably documented; verify against the repo.
- Multisite-network behavior, performance benchmarks, or production deployment guidance — all out of scope for an experimental v0.1.x release.
- The internals of the Heartbeat API beyond the one-paragraph context above. Adjacent topic, separate skill if it ever grows.
References
- Repo (active): https://github.com/WordPress/presence-api
- Announcement: Presence API Feature Plugin
- Tag for ongoing posts: https://make.wordpress.org/core/tag/presence-api/
- Maintainer: @josephfusco
- Original ticket motivating the work: WordPress core Trac #64696 (high-frequency ephemeral data without cache invalidation).
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/wordpress-presence-api-experimental-msh3uub2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/wordpress-presence-api-experimental-msh3uub2/download' --output '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md.part' && mv '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md.part' '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && test -s '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/wp-presence-api' && cp -R '.skill-downloads/wordpress-presence-api-experimental-msh3uub2' '.claude/skills/wp-presence-api'Cursor
test -f '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && test -s '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/wp-presence-api' && cp -R '.skill-downloads/wordpress-presence-api-experimental-msh3uub2' '.cursor/skills/wp-presence-api'Codex
test -f '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && test -s '.skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/wp-presence-api' && cp -R '.skill-downloads/wordpress-presence-api-experimental-msh3uub2' '.agents/skills/wp-presence-api'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/wordpress-presence-api-experimental-msh3uub2'openskills read 'wordpress-presence-api-experimental-msh3uub2'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/wordpress-presence-api-experimental-msh3uub2/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.