返回技能列表

format-apa-report

pjt222
更新于 Yesterday
3 次查看
17
2
17
在 GitHub 上查看
general

关于

This Claude Skill formats academic reports in APA 7th edition style using Quarto (apaquarto) or R Markdown (papaja). It automates title pages, abstracts, citations, tables, figures, and reference lists for psychology or social science manuscripts. Use it when generating reproducible research papers or thesis chapters directly from R analysis code.

快速安装

Claude Code

推荐
主要方式
npx skills add pjt222/agent-almanac -a claude-code
插件命令备选方式
/plugin add https://github.com/pjt222/agent-almanac
Git 克隆备选方式
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/format-apa-report

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Format APA Report

Create APA 7th edition report via Quarto (apaquarto) or R Markdown (papaja).

Use When

  • Academic paper APA
  • Psychology/social science report
  • Reproducible manuscripts w/ embedded analysis
  • Thesis/dissertation chapter

In

  • Required: Analysis code + results
  • Required: Bibliography (.bib)
  • Optional: Co-authors + affiliations
  • Optional: Manuscript type (journal, student)

Do

Step 1: Choose Framework

Option A: apaquarto (Quarto, recommended)

install.packages("remotes")
remotes::install_github("wjschne/apaquarto")

Option B: papaja (R Markdown)

remotes::install_github("crsh/papaja")

→ Chosen framework installs + loadable via library(apaquarto) or library(papaja).

If err: install fails due to missing system deps (LaTeX for PDF) → install TinyTeX first quarto install tinytex. GitHub install fails → check remotes installed + GitHub accessible.

Step 2: Create Doc (apaquarto)

Create manuscript.qmd:

---
title: "Effects of Variable X on Outcome Y"
shorttitle: "Effects of X on Y"
author:
  - name: First Author
    corresponding: true
    orcid: 0000-0000-0000-0000
    email: [email protected]
    affiliations:
      - name: University Name
        department: Department of Psychology
  - name: Second Author
    affiliations:
      - name: Other University
abstract: |
  This study examined the relationship between X and Y.
  Using a sample of N = 200 participants, we found...
  Results are discussed in terms of theoretical implications.
keywords: [keyword1, keyword2, keyword3]
bibliography: references.bib
format:
  apaquarto-docx: default
  apaquarto-pdf:
    documentmode: man
---

manuscript.qmd valid YAML: title, shorttitle, author affiliations, abstract, keywords, bibliography ref, APA format options.

If err: verify YAML indent consistent (2 spaces), author: entries list format w/ name:, affiliations:, corresponding:. Check bibliography: points to existing .bib.

Step 3: Write APA Content

# Introduction

Previous research has established that... [@smith2023; @jones2022].
@smith2023 found significant effects of X on Y.

# Method

## Participants

We recruited `r nrow(data)` participants (*M*~age~ = `r mean(data$age)`,
*SD* = `r sd(data$age)`).

## Materials

The study used the Measurement Scale [@author2020].

## Procedure

Participants completed... (see @fig-design for the study design).

# Results

```{r}
#| label: fig-results
#| fig-cap: "Mean scores by condition with 95% confidence intervals."
#| fig-width: 6
#| fig-height: 4

ggplot(summary_data, aes(x = condition, y = mean, fill = condition)) +
  geom_col() +
  geom_errorbar(aes(ymin = ci_lower, ymax = ci_upper), width = 0.2) +
  theme_apa()
```

A two-way ANOVA revealed a significant main effect of condition,
*F*(`r anova_result$df1`, `r anova_result$df2`) = `r anova_result$F`,
*p* `r format_pvalue(anova_result$p)`, $\eta^2_p$ = `r anova_result$eta`.

# Discussion

The findings support the hypothesis that...

# References

→ Content follows APA section structure (Intro, Method, Results, Discussion, References) w/ inline R for stats + proper cross-refs via @fig- + @tbl-.

If err: inline R no render → verify backtick-r syntax (`r expression`). Cross-refs as literal text → check chunk labels correct prefix + chunk has caption option.

Step 4: APA Tables

#| label: tbl-descriptives
#| tbl-cap: "Descriptive Statistics by Condition"

library(gt)

descriptive_table <- data |>
  group_by(condition) |>
  summarise(
    M = mean(score),
    SD = sd(score),
    n = n()
  )

gt(descriptive_table) |>
  fmt_number(columns = c(M, SD), decimals = 2) |>
  cols_label(
    condition = "Condition",
    M = "*M*",
    SD = "*SD*",
    n = "*n*"
  )

→ Tables render APA: italicized headers for stat symbols, proper decimal alignment, descriptive caption above.

If err: gt no APA style → gt installed + cols_label() md italics (*M*, *SD*). Papaja → apa_table() not gt().

Step 5: Citations

Create references.bib:

@article{smith2023,
  author = {Smith, John A. and Jones, Mary B.},
  title = {Effects of intervention on outcomes},
  journal = {Journal of Psychology},
  year = {2023},
  volume = {45},
  pages = {123--145},
  doi = {10.1000/example}
}

APA styles:

  • Parenthetical: [@smith2023] -> (Smith & Jones, 2023)
  • Narrative: @smith2023 -> Smith and Jones (2023)
  • Multiple: [@smith2023; @jones2022] -> (Jones, 2022; Smith & Jones, 2023)

references.bib valid BibTeX w/ all required fields (author, title, year, journal) + keys match manuscript.

If err: validate BibTeX via online or bibtool -d references.bib. Text keys exactly match .bib keys (case-sensitive).

Step 6: Render

# Word document (common for journal submission)
quarto render manuscript.qmd --to apaquarto-docx

# PDF (for preprint or review)
quarto render manuscript.qmd --to apaquarto-pdf

→ APA doc properly formatted: title page, running head, references section.

If err: PDF fails → TinyTeX installed (quarto install tinytex). DOCX issues → apaquarto Word template accessible. No references → # References heading at end.

Check

  • Title page correct (title, authors, affiliations, author note)
  • Abstract w/ keywords
  • In-text citations match reference list
  • Tables + figures numbered correctly
  • Stats APA (italicized, proper symbols)
  • References APA 7th edition
  • Page numbers + running head (PDF)

Traps

  • Inline R formatting: Backtick-r for stats, not hardcoded.
  • Citation key mismatch: .bib keys match exactly in text.
  • Figure placement: APA manuscripts typically figures at end → documentmode: man.
  • Missing CSL: apaquarto includes APA CSL; papaja may need csl: apa.csl.
  • Special chars abstracts: Avoid markdown formatting in YAML abstract block.

  • create-quarto-report — general Quarto doc
  • generate-statistical-tables — publication-ready tables
  • build-parameterized-report — batch generation

GitHub 仓库

pjt222/agent-almanac
路径: i18n/caveman-ultra/skills/format-apa-report
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能

creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能