new-quill-field
Skill0 starsChanged 8 months agoMITView on GitHub
Scaffold a Quill rich text editor component. Use when the user asks to create a rich text editor, WYSIWYG field, content editor, or any Quill-based input.
- Installs packages
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- design-componentSkill
- new-componentSkill
- new-composableSkill
- new-gql-operationSkill
- new-migrationSkill
- new-resolverSkill
- new-server-routeSkill
- new-settings-storeSkill
- new-storeSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
ALWAYS wrap in <ClientOnly> — Quill requires the DOM, SSR will break
- Very specific: line 10
Always provide a #fallback slot with a skeleton placeholder
- Very specific: line 11
Use content-type="html" — content is stored as HTML string in Postgres
- Very specific: line 12
Always sanitize HTML server-side before storing (remind user to use sanitize-html)
- Very specific: line 13
Use v-model:content not v-model
- Distinctive: line 114
If image upload is needed, ask about image storage strategy (local, S3, etc.)
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: New Quill Field
Rules
- ALWAYS wrap in
<ClientOnly>— Quill requires the DOM, SSR will break - Always provide a
#fallbackslot with a skeleton placeholder - Use
content-type="html"— content is stored as HTML string in Postgres - Always sanitize HTML server-side before storing (remind user to use
sanitize-html) - Use
v-model:contentnotv-model - Expose as a form-compatible component with
v-modelsupport viadefineModel - Place in
components/editor/
Component Template
<!-- components/editor/RichTextField.vue -->
<script setup lang="ts">
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
interface Props {
placeholder?: string
readOnly?: boolean
toolbar?: 'minimal' | 'full' | 'custom'
}
const props = withDefaults(defineProps<Props>(), {
placeholder: '',
readOnly: false,
toolbar: 'full',
})
// Two-way binding via defineModel
const content = defineModel<string>({ default: '' })
const toolbarOptions = {
minimal: [
['bold', 'italic', 'underline'],
[{ list: 'ordered' }, { list: 'bullet' }],
['clean'],
],
full: [
[{ header: [1, 2, 3, false] }],
['bold', 'italic', 'underline', 'strike'],
[{ color: [] }, { background: [] }],
[{ list: 'ordered' }, { list: 'bullet' }],
[{ align: [] }],
['link', 'image'],
['clean'],
],
custom: [], // override via slot or prop if needed
}
const quillOptions = computed(() => ({
placeholder: props.placeholder,
readOnly: props.readOnly,
modules: {
toolbar: toolbarOptions[props.toolbar],
},
}))
</script>
<template>
<div class="rich-text-field">
<ClientOnly>
<QuillEditor
v-model:content="content"
content-type="html"
:options="quillOptions"
class="min-h-[200px] rounded-md border border-input bg-background"
/>
<template #fallback>
<div class="h-[200px] animate-pulse rounded-md border border-input bg-muted" />
</template>
</ClientOnly>
</div>
</template>Usage in a Form
<RichTextField
v-model="form.content"
placeholder="Write your article..."
toolbar="full"
/>Server-side Sanitization (ALWAYS add this to resolvers)
// In your GraphQL mutation resolver before saving to DB:
import sanitizeHtml from 'sanitize-html'
const cleanContent = sanitizeHtml(input.content, {
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'h1', 'h2', 'h3']),
allowedAttributes: {
...sanitizeHtml.defaults.allowedAttributes,
img: ['src', 'alt', 'title'],
},
})Steps
- Generate the
components/editor/RichTextField.vuecomponent - Remind the user to install:
npm install @vueup/vue-quill sanitize-html @types/sanitize-html - Remind the user: ALWAYS sanitize in the server resolver before storing to Postgres
- If image upload is needed, ask about image storage strategy (local, S3, etc.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

