Buckets:
| import{s as xe,n as ye,o as be}from"../chunks/scheduler.4048030c.js";import{S as we,i as Ce,e as g,s,c as o,h as ke,a as c,d as i,b as l,f as $e,j as a,g as pe,k as he,l as ve,m as n,n as r,t as u,o as p,p as m}from"../chunks/index.5d0b9360.js";import{C as Te,H as f,E as qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.99c2e6c8.js";import{Q as I}from"../chunks/Question.e487118a.js";function Pe(me){let d,L,M,N,$,R,h,U,x,de="Test your understanding of plugin development, distribution, and best practices.",W,y,D,b,K,w,O,C,Y,k,G,v,J,T,F,q,V,P,X,j,Z,ee,te,_,ie,A,fe="If you got 4-5 correct, you’re ready to build and distribute plugins responsibly. If not, review the build and usage lessons before publishing anything.",ne,Q,se,S,ge="<li>Keep plugin structure explicit: manifest, bundled components, and documentation each have a clear place</li> <li>Ask for the minimum permissions you need and explain why</li> <li>Test locally before publishing, and keep secrets in environment variables rather than plugin files</li>",le,z,oe,E,ce="You’ve finished Unit 3: Plugins. You now know how to package reusable agent behavior and distribute it safely. Next up is Unit 4, where those components become building blocks for multi-agent workflows.",ae,H,re,B,ue;return $=new Te({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new f({props:{title:"Quiz 2: Building and Distributing Plugins",local:"quiz-2-building-and-distributing-plugins",headingTag:"h1"}}),y=new f({props:{title:"Question 1: Where does plugin.json belong?",local:"question-1-where-does-pluginjson-belong",headingTag:"h2"}}),b=new I({props:{choices:[{text:"Claude Code and Codex use the same plugin.json schema",explain:"No. Claude Code's plugin.json (in .claude-plugin/) has a different schema from Codex's (in .codex-plugin/). Codex includes fields like 'skills', 'mcpServers', 'apps', and 'interface'."},{text:"OpenCode also uses plugin.json to load local plugins",explain:"No. OpenCode plugins are JS/TS modules loaded from `.opencode/plugins/` or from package names in `opencode.json`."},{text:"In Claude Code and Codex, plugin.json defines the plugin's identity and tells the agent where to find bundled components",explain:"Correct! On manifest-first platforms, the manifest identifies the plugin and points to bundled components such as skills, MCP config, or app integrations.",correct:!0},{text:"The plugin.json should be placed at the root of the plugin directory",explain:"Not quite. It goes inside a platform-specific directory: .claude-plugin/plugin.json for Claude Code, .codex-plugin/plugin.json for Codex."}]}}),w=new f({props:{title:"Question 2: What does the manifest-first plugin structure look like?",local:"question-2-what-does-the-manifest-first-plugin-structure-look-like",headingTag:"h2"}}),C=new I({props:{choices:[{text:"A directory with .claude-plugin/ or .codex-plugin/ manifest directory, skills/ folder, optional .mcp.json, and README",explain:"Correct! That's the manifest-first structure used by Claude Code and Codex.",correct:!0},{text:"Just a skills/ folder with SKILL.md files — no manifest needed",explain:"That's a skill library, not the documented manifest-first plugin structure used by Claude Code and Codex."},{text:"A single file named manifest.json containing everything",explain:"Plugins are directories, not single files. They have discrete skills, optional MCP servers, docs, etc."},{text:"A root manifest.json with an openapi.json spec defining all endpoints",explain:"This is the legacy ChatGPT plugin format, not the current Codex or Claude Code plugin structure."}]}}),k=new f({props:{title:"Question 3: How should plugin permissions be designed?",local:"question-3-how-should-plugin-permissions-be-designed",headingTag:"h2"}}),v=new I({props:{choices:[{text:"Request only the permissions you actually need; document why each is needed; follow the principle of least privilege",explain:"Correct! Minimal, documented permissions build user trust. Both platforms emphasize security-conscious plugin design.",correct:!0},{text:"Request all possible permissions upfront to maximize future flexibility",explain:"Bad practice. Users will be wary of plugins asking for too much access."},{text:"Hide permission details in the README so users don't worry about them",explain:"Terrible idea. Transparency builds trust. Be clear about what your plugin accesses."},{text:"Permissions don't matter much; focus only on functionality",explain:"Wrong. Security-conscious users care deeply about what plugins can access. Be respectful."}]}}),T=new f({props:{title:"Question 4: How do you test plugins locally?",local:"question-4-how-do-you-test-plugins-locally",headingTag:"h2"}}),q=new I({props:{choices:[{text:"Test with claude --plugin-dir for Claude Code; create a local marketplace.json entry for Codex",explain:"Correct! Claude Code uses `--plugin-dir` for local development. Codex uses local marketplace entries for unpublished plugins.",correct:!0},{text:"You must publish to the marketplace before you can test your plugin",explain:"False. Both platforms support local development. Claude Code has --plugin-dir; Codex has local marketplace entries."},{text:"Run /plugin validate to check your plugin structure",explain:"This isn't a standard command on either platform. Use --plugin-dir (Claude Code) or local marketplace (Codex) to test."},{text:"Testing isn't necessary; just publish and fix issues later",explain:"Always test locally first. Both platforms provide local testing mechanisms before marketplace submission."}]}}),P=new f({props:{title:"Question 5: How should secrets be handled?",local:"question-5-how-should-secrets-be-handled",headingTag:"h2"}}),j=new I({props:{choices:[{text:"Always hardcode API keys in the manifest for convenience",explain:"Never! That's a security disaster. Always use environment variables."},{text:"Use environment variables for secrets, reference them from plugin or MCP config when supported, and document how to set them",explain:"Correct! This is the secure approach. Environment variables keep secrets out of version control and plugin code.",correct:!0},{text:"Prompt users for API keys at runtime",explain:"Awkward and not standard. Environment variables are the established pattern."},{text:"Store API keys in a config file that users commit to git",explain:"Terrible idea. This risks exposing secrets to version control."}]}}),_=new f({props:{title:"Summary",local:"summary",headingTag:"h2"}}),Q=new f({props:{title:"Key Takeaways",local:"key-takeaways",headingTag:"h2"}}),z=new f({props:{title:"Next Steps",local:"next-steps",headingTag:"h2"}}),H=new qe({props:{source:"https://github.com/huggingface/context-course/blob/main/units/en/unit3/quiz2.mdx"}}),{c(){d=g("meta"),L=s(),M=g("p"),N=s(),o($.$$.fragment),R=s(),o(h.$$.fragment),U=s(),x=g("p"),x.textContent=de,W=s(),o(y.$$.fragment),D=s(),o(b.$$.fragment),K=s(),o(w.$$.fragment),O=s(),o(C.$$.fragment),Y=s(),o(k.$$.fragment),G=s(),o(v.$$.fragment),J=s(),o(T.$$.fragment),F=s(),o(q.$$.fragment),V=s(),o(P.$$.fragment),X=s(),o(j.$$.fragment),Z=s(),ee=g("hr"),te=s(),o(_.$$.fragment),ie=s(),A=g("p"),A.textContent=fe,ne=s(),o(Q.$$.fragment),se=s(),S=g("ul"),S.innerHTML=ge,le=s(),o(z.$$.fragment),oe=s(),E=g("p"),E.textContent=ce,ae=s(),o(H.$$.fragment),re=s(),B=g("p"),this.h()},l(e){const t=ke("svelte-u9bgzb",document.head);d=c(t,"META",{name:!0,content:!0}),t.forEach(i),L=l(e),M=c(e,"P",{}),$e(M).forEach(i),N=l(e),a($.$$.fragment,e),R=l(e),a(h.$$.fragment,e),U=l(e),x=c(e,"P",{"data-svelte-h":!0}),pe(x)!=="svelte-12j6t3z"&&(x.textContent=de),W=l(e),a(y.$$.fragment,e),D=l(e),a(b.$$.fragment,e),K=l(e),a(w.$$.fragment,e),O=l(e),a(C.$$.fragment,e),Y=l(e),a(k.$$.fragment,e),G=l(e),a(v.$$.fragment,e),J=l(e),a(T.$$.fragment,e),F=l(e),a(q.$$.fragment,e),V=l(e),a(P.$$.fragment,e),X=l(e),a(j.$$.fragment,e),Z=l(e),ee=c(e,"HR",{}),te=l(e),a(_.$$.fragment,e),ie=l(e),A=c(e,"P",{"data-svelte-h":!0}),pe(A)!=="svelte-1mhztf"&&(A.textContent=fe),ne=l(e),a(Q.$$.fragment,e),se=l(e),S=c(e,"UL",{"data-svelte-h":!0}),pe(S)!=="svelte-15vz21p"&&(S.innerHTML=ge),le=l(e),a(z.$$.fragment,e),oe=l(e),E=c(e,"P",{"data-svelte-h":!0}),pe(E)!=="svelte-1szufn"&&(E.textContent=ce),ae=l(e),a(H.$$.fragment,e),re=l(e),B=c(e,"P",{}),$e(B).forEach(i),this.h()},h(){he(d,"name","hf:doc:metadata"),he(d,"content",je)},m(e,t){ve(document.head,d),n(e,L,t),n(e,M,t),n(e,N,t),r($,e,t),n(e,R,t),r(h,e,t),n(e,U,t),n(e,x,t),n(e,W,t),r(y,e,t),n(e,D,t),r(b,e,t),n(e,K,t),r(w,e,t),n(e,O,t),r(C,e,t),n(e,Y,t),r(k,e,t),n(e,G,t),r(v,e,t),n(e,J,t),r(T,e,t),n(e,F,t),r(q,e,t),n(e,V,t),r(P,e,t),n(e,X,t),r(j,e,t),n(e,Z,t),n(e,ee,t),n(e,te,t),r(_,e,t),n(e,ie,t),n(e,A,t),n(e,ne,t),r(Q,e,t),n(e,se,t),n(e,S,t),n(e,le,t),r(z,e,t),n(e,oe,t),n(e,E,t),n(e,ae,t),r(H,e,t),n(e,re,t),n(e,B,t),ue=!0},p:ye,i(e){ue||(u($.$$.fragment,e),u(h.$$.fragment,e),u(y.$$.fragment,e),u(b.$$.fragment,e),u(w.$$.fragment,e),u(C.$$.fragment,e),u(k.$$.fragment,e),u(v.$$.fragment,e),u(T.$$.fragment,e),u(q.$$.fragment,e),u(P.$$.fragment,e),u(j.$$.fragment,e),u(_.$$.fragment,e),u(Q.$$.fragment,e),u(z.$$.fragment,e),u(H.$$.fragment,e),ue=!0)},o(e){p($.$$.fragment,e),p(h.$$.fragment,e),p(y.$$.fragment,e),p(b.$$.fragment,e),p(w.$$.fragment,e),p(C.$$.fragment,e),p(k.$$.fragment,e),p(v.$$.fragment,e),p(T.$$.fragment,e),p(q.$$.fragment,e),p(P.$$.fragment,e),p(j.$$.fragment,e),p(_.$$.fragment,e),p(Q.$$.fragment,e),p(z.$$.fragment,e),p(H.$$.fragment,e),ue=!1},d(e){e&&(i(L),i(M),i(N),i(R),i(U),i(x),i(W),i(D),i(K),i(O),i(Y),i(G),i(J),i(F),i(V),i(X),i(Z),i(ee),i(te),i(ie),i(A),i(ne),i(se),i(S),i(le),i(oe),i(E),i(ae),i(re),i(B)),i(d),m($,e),m(h,e),m(y,e),m(b,e),m(w,e),m(C,e),m(k,e),m(v,e),m(T,e),m(q,e),m(P,e),m(j,e),m(_,e),m(Q,e),m(z,e),m(H,e)}}}const je='{"title":"Quiz 2: Building and Distributing Plugins","local":"quiz-2-building-and-distributing-plugins","sections":[{"title":"Question 1: Where does plugin.json belong?","local":"question-1-where-does-pluginjson-belong","sections":[],"depth":2},{"title":"Question 2: What does the manifest-first plugin structure look like?","local":"question-2-what-does-the-manifest-first-plugin-structure-look-like","sections":[],"depth":2},{"title":"Question 3: How should plugin permissions be designed?","local":"question-3-how-should-plugin-permissions-be-designed","sections":[],"depth":2},{"title":"Question 4: How do you test plugins locally?","local":"question-4-how-do-you-test-plugins-locally","sections":[],"depth":2},{"title":"Question 5: How should secrets be handled?","local":"question-5-how-should-secrets-be-handled","sections":[],"depth":2},{"title":"Summary","local":"summary","sections":[],"depth":2},{"title":"Key Takeaways","local":"key-takeaways","sections":[],"depth":2},{"title":"Next Steps","local":"next-steps","sections":[],"depth":2}],"depth":1}';function _e(me){return be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ee extends we{constructor(d){super(),Ce(this,d,_e,Pe,xe,{})}}export{Ee as component}; | |
Xet Storage Details
- Size:
- 11 kB
- Xet hash:
- d35ad84578ff1097886438d42e11e177a1328ee3d4935e1fcbc222cfdab2b4ed
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.