360 Secure SkillHub
360 安全技能中心

Bootstrap 5.3.8 Docs (test)

该 Skill 以本地 Bootstrap 5.3.8 文档索引和 Sass 变量表为知识库,按用户问题查找组件、工具类、布局、表单、迁移和定制内容,并输出带分类与 slug 的说明及常用 HTML/类名示例。仅覆盖 v5.3.8。

kens-agents
kens-agents
热度 13.44
最近更新 2026-07-30 02:35:41
分类:知识依赖:读写文件应用场景:概念解释 / 代码生成 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add bootstrap-v5-3-8-test
Metadata
name
bootstrap-v5.3.8
description
Retrieve Bootstrap 5.3.8 documentation and component usage guidance. Use when someone asks for "Bootstrap docs", "Bootstrap component guide", "how to use Bootstrap", "Bootstrap CSS classes", "Bootstrap utilities", or discusses Bootstrap framework features, classes, or implementation details.
version
1.0.0
homepage
https://getbootstrap.com/docs/5.3/
license
MIT
metadata
{"clawdbot":{"emoji":"🎨","requires":{"bins":["python3"]}}}

Bootstrap v5 Documentation Skill

Quick access to Bootstrap 5.3.8 framework documentation, components, utilities, and best practices.

Quick Reference

User wants... Do this
Component docs (button, card, modal, etc.) Search scripts/bootstrap-reference.json by component name
Utility classes (margin, padding, colors) Search scripts/bootstrap-reference.json utilities category
Layout/grid system Search scripts/bootstrap-reference.json layout/grid content
Form controls Search scripts/bootstrap-reference.json forms category
Customization (variables, mixins) Search scripts/bootstrap-reference.json customize content
Sass variables ($primary, $spacer, etc.) Search scripts/bootstrap-variables.json by variable name
Migration from v4 Read migration content in scripts/bootstrap-reference.json
Getting started guide Read getting-started category in scripts/bootstrap-reference.json
Bootstrap source code examples Search scripts/bootstrap-reference.json extend/customize

Important Rules

  1. Always search scripts/bootstrap-reference.json first before answering Bootstrap-related questions
  2. Cite the specific category and slug when providing Bootstrap guidance (e.g., "components-card" for Card component)
  3. Distinguish between Bootstrap v4 and v5 — this skill only covers v5.3.8
  4. Include actual Bootstrap classes in examples (e.g., btn btn-primary, card card-body)
  5. Flag deprecated features if mentioned (search customize/deprecations content)
  6. Sass variables — for $variable questions, use bootstrap-variables.json instead of guessing defaults

Usage Guide

This skill provides access to the complete Bootstrap 5.3.8 documentation extracted from the official Bootstrap repository.

Basic Pattern

// In your code
const fs = require('fs');
const reference = JSON.parse(fs.readFileSync('{baseDir}/scripts/bootstrap-reference.json', 'utf8'));
const variables = JSON.parse(fs.readFileSync('{baseDir}/scripts/bootstrap-variables.json', 'utf8'));

// Search for specific component
const result = reference.find(item => 
  item.category === "components" && 
  item.slug.includes("card")
);

// Look up a Sass variable
const primary = variables['_variables.scss']['primary'];

Component Documentation

The scripts/bootstrap-reference.json contains entries from these categories:

  • about - Bootstrap overview and ecosystem
  • components - All Bootstrap components (alerts, badges, buttons, cards, carousels, dropdowns, modals, navs, navbars, offcanvas, pagination, popovers, progress, spinners, toasts, tooltips)
  • content - Typography, images, tables, figures
  • customize - Sass variables, color system, components, options, color modes
  • extend - Approach, icons, JavaScript, Sass, webpack
  • forms - Overview, form controls, select, checks & radios, range, input groups, floating labels, validation
  • getting-started - Introduction, download, contents, webpack, parcel, vite
  • helpers - Colored links, ratio, position, stacking, visibility, vertical rule
  • layout - Breakpoints, containers, grid, columns, gutters, utilities, Z-index
  • utilities - API, background, borders, colors, display, flex, float, interactions, overflow, position, shadows, sizing, spacing, text, vertical align, visibility
  • migration - Major changes from v4 to v5

Search Strategy

  1. Component lookup → category="components", slug contains component name
  2. Utility classes → category="utilities", search by utility type (e.g., "spacing", "colors")
  3. Forms → category="forms", specific control name
  4. Layout → category="layout", "grid" or "breakpoints"
  5. Customization → category="customize", "variables" or "sass"
  6. Sass variables → scripts/bootstrap-variables.json, key = $variable-name

Key Components Reference

Component Slug pattern Key classes
Button components-button btn, btn-primary, btn-lg, btn-group
Card components-card card, card-body, card-title, card-footer
Modal components-modal modal, modal-dialog, modal-content
Navbar components-navbar navbar, navbar-brand, navbar-nav, nav-item
Form forms-overview form-control, form-label, form-check
Alert components-alert alert, alert-primary, alert-dismissible
Badge components-badge badge, badge-primary
Grid layout-grid container, row, col-*, col-md-*

Common Usage Examples

Card with button

<div class="card">
  <div class="card-body">
    <h5 class="card-title">Card title</h5>
    <p class="card-text">Some quick example text.</p>
    <a href="#" class="btn btn-primary">Go somewhere</a>
  </div>
</div>

Responsive grid

<div class="container">
  <div class="row">
    <div class="col-12 col-md-6 col-lg-4">Column 1</div>
    <div class="col-12 col-md-6 col-lg-4">Column 2</div>
    <div class="col-12 col-lg-4">Column 3</div>
  </div>
</div>

Form with validation

<div class="mb-3">
  <label for="email" class="form-label">Email</label>
  <input type="email" class="form-control is-valid" id="email">
  <div class="valid-feedback">Looks good!</div>
</div>

Gotchas

  • Bootstrap requires Popper.js for dropdowns, tooltips, and popovers — don't forget to include it
  • Container classes have different behaviors: .container (responsive fixed width) vs .container-fluid (full width)
  • Grid columns without .row will have incorrect gutters — always wrap in .row
  • Custom CSS should override Bootstrap variables in Sass, not use !important
  • JavaScript components require Bootstrap's JS bundle — they won't work with CSS-only

Further Reading

  • {baseDir}/scripts/bootstrap-reference.json — Complete Bootstrap 5.3.8 documentation index (embedded in skill)
  • {baseDir}/scripts/bootstrap-variables.json — Sass variables and defaults from _variables.scss and _utilities.scss
  • Bootstrap official docs — Live documentation