
Workers Best Practices
- 537 installs
- developers.cloudflare.com
workers-best-practices is an agent skill that surfaces official Cloudflare Workers patterns and anti-patterns for routing, security, performance, and edge runtime usage.
About
workers-best-practices is an agent skill that surfaces the official Cloudflare-recommended patterns and anti-patterns for building fast, secure, and reliable Workers applications. It helps solo developers and small teams avoid common edge-runtime mistakes around state management, caching, authentication, logging, and resource limits. The skill pulls directly from developers.cloudflare.com documentation so you get current, authoritative guidance instead of generic advice. Use it when writing new Worker scripts, reviewing pull requests, or migrating legacy code to ensure your implementation follows battle-tested conventions that scale from hobby projects to high-traffic production services.
- Official Cloudflare Workers best-practice patterns for routing, KV, Durable Objects, and R2
- Security, performance, and observability rules used by Cloudflare's own engineering teams
- Reduces production incidents by applying consistent edge-runtime conventions
- Includes code samples for common patterns like streaming responses and background tasks
- Works with wrangler, Pages Functions, and Hono-style routing
Workers Best Practices by the numbers
- 537 all-time installs (skills.sh)
- Ranked #363 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/developers.cloudflare.com --skill workers-best-practicesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 537 |
|---|---|
| Repository | developers.cloudflare.com ↗ |
What it does
Follow Cloudflare Workers official patterns that reduce cold starts, edge errors, and security misconfigurations when shipping serverless code.
Who is it for?
Best when you're creating production APIs, scheduled workers, or AI agent backends on the Cloudflare edge.
Skip if: Developers not using Cloudflare Workers or those looking for framework-specific patterns outside the Workers runtime.
When should I use this skill?
When writing, reviewing, or debugging Cloudflare Workers code to ensure it follows current official best practices.
What you get
Your Worker code follows current Cloudflare conventions, reducing runtime errors and making future maintenance easier before you deploy.
- Reviewed or generated Worker code that follows official patterns
- List of applied best practices and any remaining violations
By the numbers
- 485 installs
- Official Cloudflare documentation patterns
Files
��}�rG�f���8O�6P�d��K�z���G�D�"���P%�@��L�2�$,2bb�p�d✓Y7���#O�ƚ?$�P��s�ΥN_Ƌ��������O�����ۏ����O�?�~�n��#���o9��WZ'�?l�������?�7�"-r�Lq!;�H�F�B�N��F��i��N�'�R�+Bg J77���ܔ�4��� HM&Ā����0Y���MC�t�Fdp5�� 唞��W��!�^�K��R��jV��U!�,�E��5:�) ������X] Lh�FK�,���u��gC��F���Y(+�f����N�ʴ��a�t����L�,.�D�ʭ1<W�J�\�"�PHW(y)r�f�\�̤̥,Yȑ+��2�m�r��d�D�MY��L7-����[-qĸ-au��B�"��.Nf1lmr����Qz��Ek'����N�������2E�Gq}��T��������.���K��ʅ��mm��,�2��DNM!7���<��qP�|x�ą�FJ7V�{|Vʹpe�K��S%������v.���Qt�� 7��\�3am�ʹ�vo�����>�_��n�Q�;�/D2wniw��L^��,ea���85����q�Ǜ t�� � m�JEE���v�|s�th�N������ o@���y}P��K|���s��\����c��J�n�t.n �&�&�Q�1����F�M�loe{� ��\�.E^�~�$�s�Fcr<����x�Px�K��? ���43�������َ��C:�pR�s=�_xST��<���@"�eQH��l)f�8@!sy)�� �LN�V�lSjaY��e꾶� H`.�G��3Y��֒y>�$�r�+;���۶��(J�d"�<��O��|�<q��"S��0v�eu�鷑�������"���כ�~F#�a�I�f��`�N0��uz��㺿Q�����~�����F_� M�{:�Q��+���8�����<�xa�r!��yEѨM��eD�ȒE��s�Rn��[^��/��nr�n�5�c�t�.E�2F�R��-�4��6�����Ѹ�/UzQO��S��]Ș�^��r�Ūf�m���F�D���~�_���d����!1اP.�٥,�ɐ�����ʲpҞ� ��l?p�p�ZLr&Τ�[�h(Ns5)D���L.�ΰ�7(�~�0)U�F�3��+.}RjH�Wi.3�e��N��%(ё+����j{�v����O�U/���YՁe�a�X��)�j()�z��7+d���8}�f�Ŧm���b��ŵ~�W���d�ȸ�ّ������/%3�H�4�Jx�H�٧�Ӡ�A��(fr\j�'4,�7"��MĕP��p���?HpK=1��d��O�B�εSyX��]��E|bi���O>��diE��J��IX��"�+'�O��s����w�z���ȓg��B���!�<GC�����^ ��7$+5��{�{�$������ud.%���x"ҋY�kE�3e����C�e)�����X5&��^�Uda9rf��0ɪ^��SӯVKYd�"o7�+%��:�������u�B�~8>Z�~�'YK2ilؔ�M[��w���p�� &��I��i�4���y2�"���+=���<�)TG&#��ft���$��ɣ|c�1Tx�#�n� Q�u���o#��e�����Q�\�B����]���X�1_�EiQ���l��ʕ��ϗFe� iIX+3����*Ӳ�� �AN�X-��蘾ŅЙY���������t'��;�C��9n� ,��1�_i��ټ0�l�V�_��lo�^�U\��u,:�}�EAZ;��;�k�2�/w����(�`�f��Ot�9����+��sQZ��Σ���琫�rL�^�dM��Ō���+d&�S"�\��T"(�x�+LN�mZxg.���x���������b9��mK�����)��n�)]8�dYT� ��A�Ig�Y"�Җ��� &o!vt�$�EI�k�gm��+���p�����\<�`���Y3��N���V!�0�8G�'�E������!/Ȟ� 2�?�wuʧ��r���e��|��9Z���!�9MJfjj�4�\>3^�qR{m�Rx�^j�,OJ��y�d��T˚�^�B���4�>W(kt ZT^�� g�� \�Q:Z˜��lp[N\.cG�������x<��J�c3,��Ij@���%n���@ف䝸��I���>/P���\�DJ_��t�%E��Z�%B��Py���# $ ���������VL�[1<�G[��-%JX8K 3�$��TXWmh!E�-�T�Q5�)L�5��D��Vh��9di��\��)0VB�#���G�Q��%��,����tE����Ÿ�C�Y��$���2W����@:{;Aa�)`_�b�4J�+����������0>7sS����'?S̀���`�ҥ����V��G��y8Nnm�6�� ���m�3�X��D��a����s��\Z�>�͟Qbgj:�O���Z�L�[�T���f����}���k���?i��>��(�iC��Nlk=�{d��]��ö��A~ױ��JH�����\�f�{�<�P"W�2�A�����ۺ��N�ɰ�RZ�^϶3�/Y���È�ﰃwl�KV9C�H���Ma4�f��p̕v��6�0�Q�Z���Q�:�k�ݵ � �\�s��k�� ��~Q�NQ������`/T�C�B�Lmd�2US�vI���, r1�$��j�R�vQ��-O���i��v�EF2�qd�DŽA�UV>�����3� ����J��cD 2^������a �r��u��;���P:U��|�KHe����V�e��@�L�b�-jIb� �ШH�Qx���~ =K"V��T����qa.��J�W��{�%WZ�.�1�[�e�yj+W��r[/MZZWs��uXW���\a�-g��mČ���&����4�[���G���m$�\:�W��]\�T� ��C�}C� ZAr.�E[�hOq���ї��m�_��?<����Ǐ:��G�������?��1�> ��TE�3��,� � ���>�C���ib�$"����_��Ȥe>���~P��֖tg��9 dT��q���=�1C�ö#�+:�JT�g2��k��Q�*�,�|jM��W��;=Iࢵ'�j yp���_�L'�\f ���7�1��%8����Gy.�R ��!k�$Kj���R�?zV��Db�8 <�9�N]�V���}���l�^%3��I�-�8�^�<G4um���I�sO����8�ZTG)�p�7:nQ��>�C9�gp�*��QCϘ��q�ޘu�n��S~:+�ԍ���\�lk�z�Z4g����:�����4�8rd�zC�\��,�\�鸔�Q�"N��mx��ĥP9�K��Z��s\��6�}su���s�∣M�b҂w�[�'��/�c�� ��.#���S��bB�a�xH?�^��B$'25E�WFY�9�Y�5���w��΄Ra阖Tʀ�$;����y��o�pݿ����xo�SR:�ˌ�v��]��Q$�9+p5W��{��j����ABtA(y-R���9/���|�|n�<Ŵ�~����>x_y�$j3:���BMWU�V3�Fl��u+4sK0%,��0Au�c�Na��$f����ʓ�դ��Op/A��~�it��sP��,B҂R���/�F�<�F�4��@�G��;��f#@����k����{���I�k���gsw���R"�J�u�Ӂ�����:s�8��;W���K�xtV��D �]>��L� �6�nk��?�:2_�+�/� ���*O;5�!lּ�L�7-"u҅Ò�6�U��ݙ�n���>F�6�'<��;+6�mx�s�[ظ��*�urFn ���� �o�OyC��W�̀�]��T;���L���:�;����a[Ҕ���@p�=>��r�,���H���Hʹ)d2�/�z)S7�Ö��1��+��z������� ��T!W�N�� �����B��<a�Y�C[|�W�A�#�&�H9l�AY �����JQ0����<rǐ1z�+'&S���DC�Jr��٫��m�U����%j_����Os�Gt��a��L�&���#(�Ƌ�}��#l<��H��De!g��ͽ�;���O]�0�t�5�d��D��Z���+O\1�!�Z(��6� $z�en�)��_I���H�fKY���qz�B�!���r���t�¸�Bd]�R!��Y 5M��j8���j��p��54����(�jF�(tsxe��T4��� �Πa#��7Y !Y��<�?�,����E��4nF�����Rq�v|Q�Q)�Xx��ꪞ^�?K��͈�[����G��ǜY��1>�O�JK��b��@ ��v�YKڮ� �u�JvDH�5}A6N�>��L�����U��mښ{S�l�CVuѿ�f~ie6@�V��� �TX9�V�%H~<<�S� �tl� �j��,ٟm�!��d?LO�$�Xa��ÖZ;N{-T�~!S��t�2��qLM�o/� {L�A�}H1:镵�{5㕯CYp�_� s�2Ý��� 4"�h�8Y^��9��������Wi��}�>AiH.E�]yW��6��u!Wp��3K���i��vh�{s�d����'��m�샛�u�Â���!�#���a&�>���,d���;��+ZLHƎx�z���!_�w^e���3s����ql�: �oq�����݊7����R���]/���!NĪ\j����MA�^5]� d��cS'�䒿Ӄ�;�ʃ�ɧ�j^�i��Ln�G����~����սs����FC� ��z�-G�P�H1^��� .�`��T�y�0���,)����N�kTn�5՜����k�q��Q�̅���1����-�9:����A� ,0h����!y��:����y.�JmyFi��R�%"�aI�~X�V ;3�ٷ�+i���H��j�,�����C�]�=�!��� '�&����J�m\���l�io�N��l�Rs���lE�C���Z�#�L�ɩ��OW����#U��s��;�� �B�(���l��:1&�Bӥ<G�o}^N�� #�]C#�������H'H� ���C �o9"���B�*IV���b���_yM��w" �#�K� °Q�C�,���\�a�R���f��Ae���4������6�5��� ս�1���j���p��PKo\��W��N\����[G��~�+Ɋ����Fm�.L��xEs��i��a0�Vg��ͨ���xj��g��4�h~�oې��~됝�|�����M�x�P({�zu��W�G���Β�h�����'�UAD|��!�����5� |X=�tT� :p��~<��rp����-x^(9�F�r� c���y�5܆Z�)|HItZ�f���T]��b2�G!~���m:98;��%k0l�Ї�t���s�2������HS�-z�"a&F����>��������lE�o>|�0��Bi�P.���$mk��!���x����O�=�f-����'���O�ա�QbW 無��p�C�b)����a[�9���7���- ��ѐ��۔�F�R�^ҫ>����{��^��X���2�(�k +F=��m���Z�8;1�B�Cm���Q6r�tfae�j����{k�q�d��qҴ(�������W%J"�|-�r�X2��L����S"� B&��y�����j�{�Ƃ�DM}��� ���h7� @�_4wR��@o������ �c8���I���ז�E��߿?::�x1Xo�2�{;�c��Q�~�nYR4�N�mnj��[�ƭ�G�K���OvG�{��ؘm5'�tK��j�O����F���N�����b8jg��_��v8�;OE��:������Bm��{0hœZ�L:+�4Ć�p�pQ��f�� �Q+>��M7��g�;�����a=݀8�����o#�����9O7���x�n1�@�M_E�"WG�%�uYI̖�[wd�m��>�;��!(ec��wm��H����&�n�3�Sf��}���+<�Z�m��R6M�>�i'�A�������8���x�ņ������a&_�w!W��S�ۃ��BC}z�~�F�p�R=���̸۩W����Q7�W�YKa����Ҕh�;��ݛ��x��Sm'M��]Gٿ7)㔲9C�]� �* ��0"�m˥.wU�!Ε\��6g��I H�\�ԉ���@!�k��ӷr�d!r/��[��I���\Q9fr�*��VN���Ft�_�L9���pZ&/�8�����[o���������'�(���K{�E}�6����}�p��FtG���hJ�t� ��������k��������#�0�I���7q����:9�4�Ƒ��T�Vi�U�n��m�[o�)�Zb@�D��|= ����TQ B���[fk���QNr�G{�]�_v����!9 B&'#K�N�����<�G��$[J����?�A���T�rw���X�("�@&��� ��PUL����>v�� %� �Y!�Ek��IB�6��� p�@Fٗ���w�x�����k7t&ct�@��|�Eo�,�N1Ր�\����fd������ȱx�R�ͨ��GQ���A��^A.�7E�������}�4o�A�����&��ڱa���i����X�Lԃe�0����~�d���� �֠,r���;'��=� �d�|���OO�F?R�5G���&5Stq�:G�?x1��bl8.�RR"S+-����W��_+̯�+����� {�WSEW�x�}�$�E�u@-���uc�ę���#�c\J���i��(%�V�F���^x ^+��N �^��G/,;� �eaw�#��8�b�p�.-��eR'݈�]U6���%Y1c6a�s�q�;8`�Ȏ�!?ȳ��3�{mZ"����� ��vz��:�H,�{ʬLP�U:6�N���G9,�o,e�t`�[��/��WN���t�uɧ$'sc.�q�u�)C�ńy���TX�7ۨ5�e�sM n�Z��P鎊e~w��4ѫ/�P%�������w[�����Gi~O�~e6��<�D^8Y��o:��$�^�����nع��n�^.���{۾�&쓖�����v���]7֙���ѝ�,z�BBT�Ú��K(��Ji�c ��J+h���E��S(���墳T�kG�f����h�6�6���<,��m0���Df>��r U�+̂�Lcd�e��ٮ�ʭ��d��乤��ڍ/����@��8q� ^�:�#dIx5�n����,�(5���N�����|����������~���R)]�(�J��/���EijJ�,�ָx<����_}��8�%�Ǧ����-�K�@�\�B�oq1�^~@������7� ��m"�o_�w�.�EaNİ(��W�����\�����YeDaE���Q� ��x��In����%�9���L��D}����8���U.����#���` �'2�8,��\�(��1���ư�F�֍0<2��p���s�I��FB��L9r���_�V�J���)P�;���G�E�+V1�yE�D�<7eaǙX��!���!p{&1Oā9����l>�&b�7�V ���h�:V�WSF��b ���%<�z���R}�\'�I +!�ʛq��?d��-2��Ð�,V;r�J�Y��'S�K�V������G��������ʏ55�O�ٳg��C��u͇ޞ��?������>GL}����+,��2����qϫط s+��}y~�����h��هޞ�~y��������0"_X����Sf�`�Ң�M��2C��돷7��R�p<��E��4�[$�pq�[�C�����55��'"4�E���Eش� �J: a�"0�lC.ZH�Ơ \k��U�99ޫ�P� 4��� ���h7w~r�&�;J'r⇾�O�O���x�{�s���}ʔD`e���|��E:b���|�w�b�_Ѯ�}\+|���7%r<������P΅U�������x:C,�O�p �����C4���#�|����SK�@?�=��7�u��#��T�a&v�@�+Pi����{~��_�xmԛ�?͵�9�JϤs��UD��u�qW!MT�9ȶ.�E��1$�@X��3��o��1�$�t��]ɢ�uw�w���S�/��=�lo��������"%�lN�H�"3�[)��9.����kNRgl������;��nX!�^�m��K+�Z_Ư�89x��7�ҽ���y53��~���G�� !�2����o�O>Կ|8x��V����+]ΐ��$f��l~!?Bw�;���x����m�{}�tt5>k��K)�U�w���w(�ɓ����ѹ�Ã��3x�݂N�"������[,�����w<4��0�<����S��S�T��J�Qtw!�5�1�dr���vY$��m(X�ߨD��KoG"��Cwղ��E�!��873J���.�t�������]���-�d� #.���iī8R���L��8���x��of��'F٠��Z���12�&���|���S"j�̗�gU~2��\��Mϭ.k���Bf�q5z���Io1 �st��NKw<�o?"`����S��K����a��ݷ�!2z��i:�FzCL�S)���އ1�AH<�OD��C�ǰ��ߨu(��>� ��z>wde5��o��A��A�fB}9�1�0��Ʃ�l㫥cQv�"�H�E����+i���O��o�j4�u���e%��KSW_����F�f鼿��fkU�F��5ڍ���Э�U�5�����%a�&�+ί�m�������Y1��5�� MU��º����ȧ(�%5��OjU˭��Ǔ��%c�i�����3e��� ���lz�)ؿpL�=h��6d�(f��q�9��s���G 1<��CS���st�z�ABo6�c�k��EY;^g���2;O�9�� ��箤���г�IgY�7����M���e��~?e� $��IJCD��:���xq��l ���>�:��ݏ�F�nU������B��wW�+ws1/C��ө�m�Jm[,<�n�6��8K4TJ��N$�����(Wz�д�D��(&m}˧�U_}r\�^�Bw��d�+�|Wo ؘ��Y�^��h��"����n�(N�돽��G��#�q��i4h�z�_�-�q}�:��G�2�WP���1n��%������hn��Ƭ��,s�/�W=��C`� �㷧g�!9uw�#��E�Bkp�a��>��0��~!E?j�������:��b�~ȞRB2QE'�o5��x.qz�]��K�� �N�{��Mo�9W�#\�m�SJs+��9�bx%�%eХ��hSZƩ�֑��)6pi�ޣO��i!O�x��19.��S�(@h�+�v����wF7o�s�N��-�it��+���F��#�(7,���R\Tp;դ���y�Qc�7�S7up"��r��]�I��{�獹�[&�+ܝ��Q6q�?�j��o��Q�M�k1$�e�j�P�~ �Q�������Vzw]�� ���K"�H��M1I�9xX�߇c���WG�{�\�����$1�v���\fL��� D�~�\)�Y���M�F�����\���J}VH�e��������הԕ>����HF�Y���"i(7v�N��P�m��;빽�Q�4n�}����i[C ���x��G�J��Pft���l������9t$�=#�ռ+^�e�?�ЬI�7�};��";u�p��C�m���g�t�Wy���,H7"��x��}v��'l�p@ڂ����\S����U�� 8��������]�7y���J6�1�g����T�j�I,��#�-��&f�{��vG���-Z��S��WS����aT��OM��~�{r��4�1S%���\:g�E������������S�]/#a�W��i�����"�aea���<���Ȯ�d�S\��a�2ʜ�dx�Q�0\�y�Kc�(��m2l���RjXH\ e,S�#]e�7�X_5S��:��}b�Á�X�}4$_���AK_�����kZ����3��u����5#<��>I��'��e���а���O��Fo�j�O�O��� h�3�� ;�����}m��jd���R{��?^�����Q�l:9�16�Z�9����ށ�.7D备�;N�?ooW���vL���S��?��Y gTT�x�a�n��P�;�N���#��UMS�2��-nT'���0em2t}:���o�b^�K���<G����)~U-�`�3#�)�����$�;/c�� _��uw(�5�a�a��P �\���;Y��+*A�/���f49+]��!�l���I��Pf"Q�G������7I�P�O����'�u�<W^��!(�a���Q��ַK}��}�o�Bk���w ;�7l�+����0Ƈ93ƿ�D�� a=H��� e� 1� ��o�;3�gXO��s�o6x��ꁇ�m����e��B�a��?eD�hʦ���3�7e���a�>�pL��@q�Z��oKt>�k�����+�������~�������7ػ�
Related skills
How it compares
Use instead of generic LLM coding suggestions to get authoritative Cloudflare-specific guidance.
FAQ
Who is workers-best-practices for?
Developers and small teams shipping serverless code on Cloudflare Workers who want to follow official patterns instead of trial-and-error.
When should I use workers-best-practices?
Use it when starting a new Worker project, adding features like KV or Durable Objects, reviewing code before deployment, or troubleshooting edge runtime issues. It is especially valuable for AI agent backends, scheduled jobs, and high-traffic APIs where cold starts and resource l
Is workers-best-practices safe to install?
Yes. Users should review the Security Audits panel on this page before installing.