Communitygithub.com

slavarch/portfolio-site

生成完整的個人作品集 / 名片網站,輸出為單一 index.html 檔案。當使用者想要建立個人網站、作品集、名片網站或關於自己的登陸頁面時使用。會詢問使用者身分、角色、簡歷、技術棧與聯絡方式等問題,然後產出一個精緻、響應式、深色主題且無外部依賴的 HTML 檔案。

portfolio-site 是什麼?

此技能(slavarch/portfolio-site)專為開發者與 AI 代理設計,可自動產生個人作品集或名片網站,最終輸出為一個自包含的 index.html 檔案。它無需任何外部依賴:所有 CSS、JavaScript 與 SVG 圖示皆內嵌在單一 HTML 中。此技能適用於 Claude Code、Cursor 或 Codex 等平台,能透過互動式問答收集使用者資訊(如姓名、職稱、技術棧與聯絡方式),再依據使用者選擇的主題配色(青色、紫色、翠綠或琥珀色)填入預先設計好的深色模板。對於想要快速建立線上形象、展示作品或建立個人品牌的開發者與自由工作者而言,此技能相當實用。其產出的網站具備動畫、導航列與響應式設計,因此非常適合用於求職或專業介紹。工作流程包含兩個步驟:首先使用 `AskQuestion` 工具收集資料,接著產生完整的 HTML 檔案寫入工作區根目錄。

相容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/slavarch/portfolio-site/tree/HEAD/portfolio-site-generator

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

作品集網站產生器

產生完整的 index.html 個人作品集網站。無外部依賴 — 所有內容皆內嵌(CSS、JS、SVG 圖示)。

步驟 1 — 收集使用者資訊

使用 AskQuestion 工具收集以下資訊。若無法使用,則以對話方式詢問。

要詢問的問題:

  1. 姓名 — 全名或希望在網站上顯示的名稱
  2. 職稱 — 例如「技術長」、「前端開發者」、「產品設計師」、「創辦人」
  3. 標語 — 一句個人哲學或方針(例如:「我像打造系統一樣謹慎地打造團隊」)
  4. 關於段落 1 — 他們如何進入這個領域;他們的故事/起源
  5. 關於段落 2 — 哲學、價值觀、工作方式
  6. 關於段落 3 — 工作之外的生活:嗜好、興趣、個人細節
  7. 技術棧 / 技能 — 逗號分隔的工具、語言或技能列表,以標籤形式顯示
  8. 聯絡方式 — 要包含哪些項目及其實際值:
    • 電子郵件
    • Telegram 帳號
    • GitHub 帳號
    • LinkedIn 帳號/網址
  9. 配色方案 — 選擇一種:
    • cyan — 深海軍藍 + 電光青(預設,科技/技術長風格)
    • purple — 深色 + 紫羅蘭(創意、設計師風格)
    • emerald — 深色 + 翡翠綠(開發者、開源風格)
    • amber — 深色 + 琥珀金(創辦人、商業風格)

步驟 2 — 產生檔案

使用收集到的答案填入以下範本。將結果寫入工作區根目錄的 index.html。

配色方案變數

根據選擇的方案替換 :root 變數:

cyan(預設):

--accent-300: #67e8f9; --accent-400: #22d3ee; --accent-500: #06b6d4; --accent-600: #0891b2;
--bg-primary: #07111a; --text-primary: #e8f4f8; --text-secondary: #7fb3c8;
--border: rgba(6, 182, 212, 0.15);

漸層:rgba(6, 182, 212, 0.12)、rgba(8, 145, 178, 0.07)、rgba(14, 165, 233, 0.05)

purple:

--accent-300: #c4b5fd; --accent-400: #a78bfa; --accent-500: #8b5cf6; --accent-600: #7c3aed;
--bg-primary: #0f0b1a; --text-primary: #f0ecf9; --text-secondary: #a09bb5;
--border: rgba(139, 92, 246, 0.15);

漸層:rgba(124, 58, 237, 0.15)、rgba(139, 92, 246, 0.08)、rgba(109, 40, 217, 0.06)

emerald:

--accent-300: #6ee7b7; --accent-400: #34d399; --accent-500: #10b981; --accent-600: #059669;
--bg-primary: #060f0a; --text-primary: #ecfdf5; --text-secondary: #6ee7b7;
--border: rgba(16, 185, 129, 0.15);

漸層:rgba(16, 185, 129, 0.12)、rgba(5, 150, 105, 0.07)、rgba(6, 95, 70, 0.05)

amber:

--accent-300: #fcd34d; --accent-400: #fbbf24; --accent-500: #f59e0b; --accent-600: #d97706;
--bg-primary: #0f0d07; --text-primary: #fefce8; --text-secondary: #a8935a;
--border: rgba(245, 158, 11, 0.15);

漸層:rgba(245, 158, 11, 0.10)、rgba(217, 119, 6, 0.06)、rgba(180, 83, 9, 0.04)

HTML 範本

<!DOCTYPE html>
<html lang="zh-TW">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{NAME}} — {{ROLE}}</title>
  <style>
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      /* 在此插入顏色變數 */
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--bg-primary);
      color: var(--text-primary);
      line-height: 1.75;
      min-height: 100vh;
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 50% 0%, {{GRAD1}} 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 100%, {{GRAD2}} 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 5% 55%, {{GRAD3}} 0%, transparent 50%);
      pointer-events: none;
      z-index: 0;
    }

    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      padding: 1.2rem 2rem; display: flex; justify-content: center; gap: 2rem;
      backdrop-filter: blur(20px);
      background: color-mix(in srgb, var(--bg-primary) 75%, transparent);
      border-bottom: 1px solid var(--border);
    }

    nav a {
      color: var(--text-secondary); text-decoration: none;
      font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase;
      transition: color 0.25s; position: relative; padding: 0.2rem 0;
    }

    nav a::after {
      content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
      height: 2px; background: var(--accent-400); border-radius: 1px;
      transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
    }

    nav a:hover { color: var(--accent-300); }
    nav a:hover::after, nav a.active::after { transform: scaleX(1); }
    nav a.active { color: var(--accent-400); }

    section {
      position: relative; z-index: 1;
      max-width: 760px; margin: 0 auto;
      padding: 0 1.5rem; scroll-margin-top: 96px;
    }

    .hero {
      min-height: 100vh; display: flex; flex-direction: column;
      justify-content: center; align-items: flex-start; gap: 1.2rem;
    }

    @keyframes heroSlideUp {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .hero > * { animation: heroSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) both; }
    .hero > *:nth-child(1) { animation-delay: 0.10s; }
    .hero > *:nth-child(2) { animation-delay: 0.22s; }
    .hero > *:nth-child(3) { animation-delay: 0.34s; }
    .hero > *:nth-child(4) { animation-delay: 0.46s; }
    .hero > *:nth-child(5) { animation-delay: 0.58s; }

    .hero-greeting { font-size: 1rem; color: var(--accent-400); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }

    .hero h1 {
      font-size: clamp(2.8rem, 7vw, 4.5rem); font-weight: 700;
      line-height: 1.1; letter-spacing: -0.02em;
      background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-400) 100%);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }

    .hero-role { font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: var(--text-primary); font-weight: 500; opacity: 0.8; }

    .hero-tagline { font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--text-secondary); max-width: 540px; line-height: 1.8; }

    .hero-cta {
      margin-top: 1rem; display: inline-block; padding: 0.75rem 2rem;
      border: 1px solid var(--accent-500); border-radius: 999px;
      color: var(--accent-400); text-decoration: none; font-size: 0.95rem;
      transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    }

    .hero-cta:hover {
      background: var(--accent-600); color: #fff;
      box-shadow: 0 0 28px color-mix(in srgb, var(--accent-500) 40%, transparent);
      transform: translateY(-2px);
    }

    .about { padding-top: 8rem; padding-bottom: 6rem; }

    .section-label { font-size: 0.85rem; color: var(--accent-400); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.6rem; font-weight: 500; }

    .section-title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 2rem; }

    .about p { color: var(--text-secondary); margin-bottom: 1.4rem; font-size: 1.05rem; line-height: 1.85; }

    .tech-label { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; margin-top: 2.5rem; margin-bottom: 1rem; opacity: 0.65; }

    .tech-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }

    .tech-tag {
      padding: 0.4rem 1rem; border-radius: 999px;
      background: var(--bg-card, rgba(255,255,255,0.04)); border: 1px solid var(--border);
      font-size: 0.85rem; color: var(--accent-400); white-space: nowrap;
      transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, color 0.25s;
      cursor: default;
    }

    .tech-tag:hover {
      transform: translateY(-2px); border-color: var(--accent-500);
      color: var(--accent-300);
      box-shadow: 0 0 18px color-mix(in srgb, var(--accent-500) 30%, transparent);
    }

    .contacts { padding-top: 4rem; padding-bottom: 8rem; }

    .contact-card {
      background: rgba(255,255,255,0.04); border: 1px solid var(--border);
      border-radius: 1.2rem; padding: 2.5rem; margin-top: 2rem;
    }

    .contact-card p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.8; }

    .contact-links { display: flex; flex-direction: column; gap: 0.2rem; }

    .contact-link {
      display: flex; align-items: center; gap: 0.8rem;
      color: var(--text-primary); text-decoration: none; font-size: 1rem;
      padding: 0.65rem 0.8rem; border-radius: 0.6rem; position: relative;
      transition: color 0.25s, transform 0.2s;
    }

    .contact-link::before {
      content: ''; position: absolute; inset: 0; border-radius: 0.6rem;
      background: var(--accent-500); opacity: 0; transition: opacity 0.25s;
    }

    .contact-link:hover { color: var(--accent-300); transform: translateX(6px); }
    .contact-link:hover::before { opacity: 0.06; }

    .contact-link svg, .contact-link span { position: relative; z-index: 1; }

    .contact-link svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent-500); transition: color 0.25s; }
    .contact-link:hover svg { color: var(--accent-400); }

    .divider { height: 1px; background: var(--border); margin: 0 auto; max-width: 760px; }

    footer { position: relative; z-index: 1; text-align: center; padding: 2rem 1rem 3rem; color: var(--text-secondary); font-size: 0.8rem; opacity: 0.5; }

    .fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
    .fade-in.visible { opacity: 1; transform: translateY(0); }

    @media (max-width: 600px) {
      nav { padding: 1rem; gap: 1.2rem; }
      nav a { font-size: 0.8rem; }
      .contact-card { padding: 1.5rem; }
      section { padding: 0 1.2rem; }
    }
  </style>
</head>
<body>

  <nav>
    <a href="#hero">首頁</a>
    <a href="#about">關於</a>
    <a href="#contacts">聯絡</a>
  </nav>

  <section class="hero" id="hero">
    <span class="hero-greeting">你好,我是</span>
    <h1>{{NAME}}</h1>
    <p class="hero-role">{{ROLE}}</p>
    <p class="hero-tagline">{{TAGLINE}}</p>
    <a href="#contacts" class="hero-cta">與我聯絡</a>
  </section>

  <div class="divider"></div>

  <section class="about" id="about">
    <p class="section-label fade-in">關於我</p>
    <h2 class="section-title fade-in">{{ABOUT_TITLE}}</h2>
    <p class="fade-in">{{ABOUT_P1}}</p>
    <p class="fade-in">{{ABOUT_P2}}</p>
    <p class="fade-in">{{ABOUT_P3}}</p>
    <p class="tech-label fade-in">{{TECH_LABEL}}</p>
    <div class="tech-grid fade-in">
      {{TECH_TAGS}}
    </div>
  </section>

  <div class="divider"></div>

  <section class="contacts" id="contacts">
    <p class="section-label fade-in">聯絡方式</p>
    <h2 class="section-title fade-in">讓我們聊聊</h2>
    <div class="contact-card fade-in">
      <p>{{CONTACT_INTRO}}</p>
      <div class="contact-links">
        {{CONTACT_LINKS}}
      </div>
    </div>
  </section>

  <footer>&copy; {{YEAR}} {{NAME}}</footer>

  <script>
    let n = 0;
    const fo = new IntersectionObserver((entries) => {
      entries.filter(e => e.isIntersecting)
             .sort((a,b) => a.target.offsetTop - b.target.offsetTop)
             .forEach(e => { setTimeout(() => e.target.classList.add('visible'), n++ * 100); fo.unobserve(e.target); });
    }, { threshold: 0.15 });
    document.querySelectorAll('.fade-in').forEach(el => fo.observe(el));

    const links = document.querySelectorAll('nav a');
    const vis = new Map();
    const setActive = id => links.forEach(l => l.classList.toggle('active', l.getAttribute('href') === `#${id}`));
    const no = new IntersectionObserver((entries) => {
      entries.forEach(e => e.isIntersecting ? vis.set(e.target.id, { r: e.intersectionRatio, t: e.boundingClientRect.top }) : vis.delete(e.target.id));
      if (!vis.size) return;
      setActive([...vis.entries()].sort((a,b) => b[1].r - a[1].r || Math.abs(a[1].t) - Math.abs(b[1].t))[0][0]);
    }, { threshold: [0.2,0.35,0.5,0.65], rootMargin: '-90px 0px -45% 0px' });
    document.querySelectorAll('section[id]').forEach(s => no.observe(s));
    setActive('hero');
  </script>

</body>
</html>

聯絡按鈕片段(僅使用使用者提供的項目)

電子郵件:

<a href="mailto:{{EMAIL}}" class="contact-link">
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M22 4L12 13 2 4"/></svg>
  <span>{{EMAIL}}</span>
</a>

Telegram:

<a href="https://t.me/{{TELEGRAM}}" target="_blank" rel="noopener" class="contact-link">
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M21.2 4.6L2.5 11.1c-.7.3-.7.8 0 1l4.8 1.5 1.8 5.8c.2.5.6.6 1 .3l2.6-2.1 4.9 3.6c.5.4 1 .2 1.1-.5L21.9 5.6c.2-.8-.3-1.2-.7-1z"/><path d="M9.3 13.6l8.4-7.2"/></svg>
  <span>Telegram</span>
</a>

GitHub:

<a href="https://github.com/{{GITHUB}}" target="_blank" rel="noopener" class="contact-link">
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/></svg>
  <span>GitHub</span>
</a>

LinkedIn:

<a href="https://linkedin.com/in/{{LINKEDIN}}" target="_blank" rel="noopener" class="contact-link">
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg>
  <span>LinkedIn</span>
</a>

輸出

寫入工作區根目錄的 index.html。

相關技能